Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347987

Summary: primaryKeyUpdateDisallowedException on Embedded Class if attributeOverride name is equal to owner pk name
Product: z_Archived Reporter: Missing name <frank_wuerffel>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: dazeydev.3, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Missing name CLA 2011-06-01 14:12:04 EDT
Build Identifier: 

When the name of the AttributeOverride(name=id) for an Embedded configuration is eqal to the Id of the Owner a primaryKeyUpdateDisallowedException is thrown if the field of the embedded object is updated even though this should be possible.
If the field of the Embedded object is renamed to sg else (e.g. name=someId) all works as expected.

Reproducible: Always

Steps to Reproduce:
1. create an entity with an id.
2. create an embeddable with a field called the same as the owner entity id field.
3. create an embedded field in the entity with an attributeOverrid for the field of the embedded entity.
4. In a UnitTest create and save an instance of entity with an instance of the embedded entity
5. change the field of the embedded entity to sg else
6. update the owner entity with the change in the embedded entity
Comment 1 Tom Ware CLA 2011-06-16 14:17:58 EDT
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 3 Eclipse Webmaster CLA 2022-06-09 10:30:08 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink