EclipseLink merge fails to insert [message #1008323] |
Mon, 11 February 2013 17:32  |
Eclipse User |
|
|
|
Hi,
In my project we use EclipseLink with JPA. We are persisting/updating a table using entityManager.merge(object). This works well for 98% of the times. 1.6% time it fails to do a new insert and 0.4% of times it fails to do an update. The issue is also not consistent. In the 2% cases, for some object if we re-process after 10 mins it works good and for some other objects if we restart the server it works good. There are no exceptions in the log.
Can anyone provide a clue on this. We are using the EclipseLink version 2.3.0. Are there any know bugs
Thanks in advance for your help on this.
|
|
|
Re: EclipseLink merge fails to insert [message #1008488 is a reply to message #1008323] |
Tue, 12 February 2013 12:34  |
Eclipse User |
|
|
|
Merge on object trees can cause problems if object identity is not maintained, so it all depends on how you are using it and how you are cascading merge over the object graph. For instance, if you read in Tree A with references to B and C, but B also references C. If you Read in C from a different context (say C') make changes, associate it to A and then merge A, you may get into problems depending on the B->C relationship if both C and C' exist in the object graph being merged.
I don't know of any open issues where inserts or updates would be skipped otherwise, but you can try a later build (2.4.1 is released, a 2.5 nightly, or even 2.3.3) to see if it helps, otherwise you may need to isolate a use case where it occurs more frequently and try adding debugging to see how the entity is managed.
Best Regards,
Chris
|
|
|
Powered by
FUDForum. Page generated in 0.04317 seconds