| Summary: | Delete + Insert to a @MantToMany in same transaction causes Inserts to be missed | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mitesh Meswani <mitesh.meswani> | ||||||
| Component: | Eclipselink | Assignee: | Tom Ware <tom.ware> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P2 | CC: | eclipselink.orm-inbox, tom.ware | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
This issue was triggered by http://java.net/jira/browse/GLASSFISH-15883 Initial target: 2.3 - pending more triage Workaround: Use this persistence unit property:
<property name="eclipselink.weaving.changetracking" value="false"/>
Note: This will only occur if you add and remove the exact same elements. Any additional added or removed objects will result in the changes being sent. Created attachment 196914 [details]
proposed fix
The change clears the list of added and removed objects in an IndirectCollection using attribute change tracking at the same time as the change set is cleared Reviewed by Andrei Ilitchev Approved by Peter Krogh Tested with JPA and Core LRG Added test to EntityManagerJUnitTestCase The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Created attachment 195806 [details] Reproduction Attached test case reproduces the issue in JavaSE environment. Here are steps to execute the test case 1. unzip the testcase 2. Adjust build.properties to point to your EcliopseLink workspace 3. Adjust test.properties to point to your database 4. Execute the test using "ant agent run". Observe how expected insert statements into the relationship table are not executed at end of test case Please note that if agent is not used in above step, insert statements are executed as expected.