Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347987 - primaryKeyUpdateDisallowedException on Embedded Class if attributeOverride name is equal to owner pk name
Summary: primaryKeyUpdateDisallowedException on Embedded Class if attributeOverride na...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 14:12 EDT by Missing name CLA
Modified: 2022-06-09 10:30 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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