[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [eclipselink-users] merge() cascading by default?
- From: James Sutherland <jamesssss@xxxxxxxxx>
- Date: Tue, 16 Sep 2008 06:23:56 -0700 (PDT)
- Delivered-to: firstname.lastname@example.org
I think this is correct.
merge() and persist() are different operations. Merge is merging from one
detached copy of the object, into a managed object, if something is not
cascade merge, it just doesn't need to merge that attribute. For persist
the new object is being made managed (itself, not a copy), so has to resolve
all of its references.
However, I would expect the relation to just not be merged, not to be
inserted. Is the object you are merging new or existing? How are the new
object relations that are inserted mapped? Perhaps include some example
> Here is the output I see with logging enabled.
> I hope file attachments works with nabble :)
> good.txt refers to the output I expect. bad.txt refers to the unexpected
> http://www.nabble.com/file/p19501990/good.txt good.txt
> http://www.nabble.com/file/p19501990/bad.txt bad.txt
> cowwoc wrote:
>> When I merge() an Image object, EclipseLink seems to persist all objects
>> referenced by the object. If I change to persist() it complains that one
>> of the referenced object was transient but not cascaded.
>> I am expecting the same warning to be issued for merge(). The
>> documentation says that the default cascade is none but the behavior
>> seems otherwise. I am using EclipseLink 1.0.1.
>> Thank you,
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
View this message in context: http://www.nabble.com/merge%28%29-cascading-by-default--tp19501823p19511727.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.