Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326511 - registerNewObject in nested UnitOfWork not working
Summary: registerNewObject in nested UnitOfWork not working
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 critical with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 06:47 EDT by Frank Kuepper CLA
Modified: 2022-06-09 10:27 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Kuepper CLA 2010-09-29 06:47:31 EDT
Build Identifier: 2.0.0.v20091127-r5931, also tested with current 2.1.1 build

When creating a new object and registering it in a nested UnitOfWork with registerNewObject the object is not inserted into the database after commit of all (nested and top-level) UOW.

Using registerObject for all registrations is no option for us because of the performance impact of unnecessary existence checks.

Reproducible: Always

Steps to Reproduce:
1. acquire a top-level UOW from the session
2. acquire a nested UOW
3. create a new object
4. register the new object on the nested UOW with registerNewObject
5. commit nested UOW
6. commit top-level UOW
Comment 1 Tom Ware CLA 2010-10-07 10:49:18 EDT
Setting target and priority.  See the following page for details of the meanings of these:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 2 Peter Sterba CLA 2012-11-09 02:36:42 EST
I may have a similiar problem.
I have found out, that it does perform well in old versions of TopLink. It worked on 9.0.3 and 9.0.4.8 but not on 10.1.3.0 and 10.1.3.3.

You may try to assign ID to the new object in nested UOW before commit to parent UOW - this worked in all TopLink versions and in EclipseLink as well.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:27:51 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink