Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Behaviour merge() of detached objects(Behaviour merge() of detached objects)
Behaviour merge() of detached objects [message #1079837] Mon, 05 August 2013 06:21 Go to next message
Jack Kilian is currently offline Jack KilianFriend
Messages: 40
Registered: March 2012

a short EclipseLink newbie question.

We compared hibernate and EclipseLink regarding the merge of detached objects.
Hibernate return's a new java reference when we do this? When we think about a FatClient like RCP not a good behaviour...e.g. binding and etc. is a pattern not working like this.

What's the behaviour of EclipseLink? Is this a standard behaviour of the JPA2 spec?
(That's one key requirement to use EclipseLink instead of Hibernate.)

best regards

[Updated on: Mon, 05 August 2013 07:01]

Report message to a moderator

Re: Behaviour merge() of detached objects [message #1082407 is a reply to message #1079837] Thu, 08 August 2013 14:26 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

The JPA specification requires that merge() returns the managed version of the detached object (it must be a new reference).

That is the whole point of merge(). If you don't want this, if the object is new, then consider using persist().

James : Wiki : Book : Blog : Twitter
Previous Topic:org.osgi.framework.BundleException: Bundle org.eclipse.persistence.jpa cannot be resolved
Next Topic:Problem with table generation using a converter and column length
Goto Forum:

Current Time: Sun May 20 12:22:17 GMT 2018

Powered by FUDForum. Page generated in 0.01927 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top