Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Behaviour of nested UnitOfWork
Behaviour of nested UnitOfWork [message #1808442] Mon, 24 June 2019 17:09
thorsten kruse is currently offline thorsten kruseFriend
Messages: 6
Registered: October 2017
Junior Member
Hi, I noticed some unexpected behaviour, look at this. Read an Employee, create a new Adress, delete all adresses and the Employee:

UnitOfWork uow = getSomeNewUnitOfWork();
Employee bob = ReadEmp("Bob") and create a new Adress for Bob.
UnitOfWork uowN = uow.acquireUnitOfWork();
Employee bobN = uowN.registerObject(bob);
printAllAdresses(bobN); //result is as expected, the new Adress is present
bobN.deleteAllAdresses(use ouwN);
printAllAdresses(bobN); // no adress listed
bobN.delete(use uowN);
printAllAdresses(bob); // no adress listed

Bob and the old adresses are deleted, but the new adress is inserted to DB. To my mind, this is a bug. What do you think?


Debugging with stop after uowN.commit(); you can see instance bob has still the new adress. If Bob (bobN) is not deleted everything works fine.
UnitOfWorkImpl.commitNestedUnitOfWork calling mergeChangesIntoParent() does not work correctly. I will open a bug.

[Updated on: Tue, 25 June 2019 10:23]

Report message to a moderator

Previous Topic:Error Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd
Next Topic:What are the Java version compatible with EclipseLink 2.7.4?
Goto Forum:

Current Time: Thu May 30 09:46:37 GMT 2024

Powered by FUDForum. Page generated in 0.03264 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top