Community
Participate
Working Groups
This bug is based on Bug 340802 - merge problem: existing object referenced by new not cascade merged. It happens even after bug 340802 is fixed. To reproduce follow the scenario from bug 340802, but before merge clear the shared cache. Not that after bug 340802 is fixed the merged B is correct in EntityManager cache. However both in shared cache and in data base B still has the old state.
James suggests that this bug should be fixed by changing merge process for new objects: for each new object to be merged create an empty object of the corresponding type and merge into it the new object. In that case there will be no more cascadeOnly merges. Should be careful because the same merging code is used in several scenarios - not only for merge operation. The code should be changed for merging from clone into working copy case only.
The test for the bug is already checked in (though commented out for now): EntityManagerJUnitTestSuite.testMergeNewReferencingOldChanged - should be uncommented when the bug is fixed.
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink