updating entities and flush changes issue

1 view
Skip to first unread message

Rico Leuthold

unread,
Mar 3, 2011, 8:12:10 AM3/3/11
to flextrine
Hi Dave,

(Sorry me again ...)

I'm running into a problem when I want to update entities which are
newly created and flushed to the database.

The scenario is as follows:

1.) Create a new entity and flush it to the database.

Trace:
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding
[OtherLocation id=null] {repository=OtherLocation,
tempUid=0E91571A-9F61-6B41-B540-7BCEE55176F1}
[INFO] org.davekeen.flextrine.orm.EntityManager Persisting
[OtherLocation id=null]
[INFO] org.davekeen.flextrine.orm.EntityManager Flushing
[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted
entity [OtherLocation id=null] with uid 0E91571A-9F61-6B41-
B540-7BCEE55176F1
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating
[OtherLocation id=38] to [OtherLocation id=38]
{repository=OtherLocation, idHash=38}

DB:
+----+-------------+
| id | description |
+----+-------------+
| 39 | test |
+----+-------------+


2.) Update some of the properties (e.g. set description to 'test
update') of this entity and flush these changes to the database.

[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on
managed entity [OtherLocation id=39] - property 'description' from
'test' to 'test update' {repository = OtherLocation}
[INFO] org.davekeen.flextrine.orm.EntityManager Flushing

DB:

+----+-------------+
| id | description |
+----+-------------+
| 39 | test |
+----+-------------+

I would expect these changes to be applied on the database, but they
are not (at least in my case).

Thanks again.

- rico

P.S. I know that it is not a common practice to flush the changes
every now and then. But in some situations it is needed that the
information is made available to other users of the application asap.

Dave Keen

unread,
Mar 3, 2011, 8:37:48 AM3/3/11
to flex...@googlegroups.com, Rico Leuthold
Hey Rico,

I actually got bitten by this bug too last night and its been fixed in the master branch on GitHub :)

For future reference stuff like this which is a bug report rather than a discussion should be logged in the GitHub issues page at https://github.com/ccapndave/flextrine/issues

Cheers,

Dave
No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.872 / Virus Database: 271.1.1/3479 - Release Date: 03/03/11 08:34:00

Rico Leuthold

unread,
Mar 3, 2011, 10:37:16 AM3/3/11
to flextrine
If I had known that this is a bug ... :-)

Thanks
- rico

On Mar 3, 2:37 pm, Dave Keen <d...@ruffness.com> wrote:
> Hey Rico,
>
> I actually got bitten by this bug too last night and its been fixed in
> the master branch on GitHub :)
>
> For future reference stuff like this which is a bug report rather than a
> discussion should be logged in the GitHub issues page athttps://github.com/ccapndave/flextrine/issues
Reply all
Reply to author
Forward
0 new messages