[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [eclipselink-users] detached object changes aren't completely merged?
- From: Tom Ware <tom.ware@xxxxxxxxxx>
- Date: Fri, 30 Nov 2012 11:22:03 -0500
- Delivered-to: firstname.lastname@example.org
- Organization: Oracle Corporation
- User-agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1
The problem in your test is that your object model is inconsistent when you
child has name "baby", but the child with the corresponding id in parent has
name "son". (You have not maintained identity on the client side.) When you
merge, the order of the merge will decide what the final name of the child is.
If child merges first, the name will initially get set to "baby" and then
when parent merges, the Cascade to childs will find that the child is a
different object and merge it in resetting to "son".
You need to ensure before you merge child, that the model is consistent and
that if parent has a back pointer to child, it is the same instance of child.
On 30/11/2012 10:32 AM, hilmarf wrote:
thanks for your advice. I'm using now getter/setter (updated sources:
src.zip <http://eclipse.1072660.n5.nabble.com/file/n156075/src.zip> ) AND
set the property eclipselink.weaving.changetracking to false.
But that didn't solve the problem...
I've tested it with eclipseLink 2.4.1 and 2.3.2.
A little more background: in reallity I'm using hessian to serialize the
objects to the gui. And I need to find a way how to savely store all
changes. I tried to debug this thing and dived deep into the eclipseLink
code... I have seen that the changed names are merged into the managed
object, but later on when the referenced parent is merged, it holds an 'old'
child (with the old name) and that seams to overwrite the previous change.
Clear so far?
Sorry for my bad english - I'm no nativ speaker...
View this message in context: http://eclipse.1072660.n5.nabble.com/detached-object-changes-aren-t-completely-merged-tp156056p156075.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
eclipselink-users mailing list