Bug 394070 - merge problem: changes from new object in nested UOW not merget to parent UOW if ID is not set
Summary: merge problem: changes from new object in nested UOW not merget to parent UOW...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 major with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, core, usability
Depends on:
Blocks:
 
Reported: 2012-11-12 02:42 EST by Peter Sterba CLA
Modified: 2022-06-09 10:04 EDT (History)
3 users (show)

See Also:


Attachments
EclipseProject to reproduce bug on DerbyDB (34.89 KB, application/zip)
2012-11-12 02:42 EST, Peter Sterba CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sterba CLA 2012-11-12 02:42:55 EST
Created attachment 223443 [details]
EclipseProject to reproduce bug on DerbyDB

Possibly related to bug 326511

This bug did not happen in old TopLink 9.0.3 and 9.0.4.8 but it did in TopLink 10.1.3.0 and 10.1.3.3 and EclipseLink 2.4.0 

Attached below is working example of this bug.

One-To-Many relationships (e.g. Person-To-PhoneNumber )
Person is mapped to PhoneNumber as One-To-Many, and PhoneNumber is mapped to Person as One-To-One. 

Reproducible: Always, if ID of the new PhoneNumber is null.

Steps to Reproduce:
1. acquire a top-level UOW from the session
2. read and register Person object with this UOW
3. acquire a nested UOW and register Person with this nested UOW 
4. create new PhoneNumber object, and set references to Person clone from nested UOW
5. commit nested uow to parent - (listing Person from parent shows new PhoneNumber)
7. repeat step 3.: acquire a nested UOW and register Person with this nested UOW 
8. via nested Person clone get the recently created PhoneNumber, and change its state (change some value)
9. commit nested uow to parent
10. Listing Person from parent will show old state of the new PhoneNumber

It did worked on all versions (including EclipseLink) when I set an id !=null while creating new PhoneNumber object. But those old applications I am migrating are expecting to have id == null until commit.
Comment 1 Tom Ware CLA 2013-01-03 09:28:05 EST
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.
Comment 2 Tom Ware CLA 2013-04-03 11:44:33 EDT
Did not make 2.4.2 deferring.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:04:56 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink