Hi Brian,

nice to hear that; this is the way I handle updates on my objects, and it goes pretty well. To make things clear, tell me if I'm wrong, re-query the object by identity is the only way to get a reference to the object directly from the cache to avoid querying the database (provided OJB is configured with a cache, of course).

This is something that was not obvious when I first studied the tutorials (well, I began back in March last year, before you had a chance to enhance them), and may be worth to mention, in my opinion.


Brian McCallister wrote:


[...]


On the ODMG markDirty / store thing... I don't know for sure, but there is a potential for lost updates when using markDirty(...). The practice I have had recommended, and use, is to just re-query it by identity in the bounds of a transaction and make the changes, rather than modifying a persistent object outside of a transaction and forcing changes back in.

[...]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to