Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Pre-existing managed entity instances in the persistence context: pre-existing on disk? Or...?

On Fri, Jul 26, 2013 at 6:23 AM, Christopher Delahunt <christopher.delahunt@xxxxxxxxxx> wrote:
No, Andrei I believe was referring to EclipseLink searching the cache for the entity, and if its not there, building a new instance.  If its not in the cache, EclipseLink by default will check the database to see if the object is existing and use that data to build the managed instance.  So you will not get a duplicate insert when using merge with EclipseLink with the code you have provided.

Excellent; thank you.  So "pre-existing managed instance" really DOES mean one that isn't ACTUALLY there in the persistence context at the time of merging (after all the pc is empty), but one that is just-in-time put there (found in the cache, found on disk) by the provider right before the actual "meat" of the merge method is performed.  Thank you; I'll presume this is what the specification was attempting to convey.  I have a question out to the spec list but haven't heard anything back yet.

Best,
Laird

--
http://about.me/lairdnelson

Back to the top