Community
Participate
Working Groups
When creating a new object, deleting it and an object in relation within an nested context, commits the new object to DB. 1) Create a new UnitOfWork 2) Read an Employee Bob and his adresses. 3) Create and register a new adress for Bob. 4) Start a nested UnitOfWork and register Bob 5) Delete all Adresses and Bob 6) commit nested UnitOfWork 6.1) Stop here for debugging 7) commit UnitOfWork At 6.1) you can see no adresses at nested Bob, but still all adresses at Bob. After 7) you see an INSERT statement for the new adress and DELETEs for the other adresses and Bob. Looking to DB tables shows the result of the statements. Status of DB tables differs completely to status of Entities. Both status are wrong. DB constraint fails for Adress.employee as the field points to a non existing Employee (just deleted). see https://www.eclipse.org/forums/index.php/t/1099446/
Created attachment 280004 [details] Reproducer
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink