Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313204 - [API] Incorrect validation errors on EclipseLink example of derivied Id?
Summary: [API] Incorrect validation errors on EclipseLink example of derivied Id?
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Paul Fullbright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-17 13:44 EDT by Karen Butzke CLA
Modified: 2013-07-11 14:21 EDT (History)
1 user (show)

See Also:


Attachments
example jpa project (6.69 KB, application/zip)
2010-05-17 13:44 EDT, Karen Butzke CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2010-05-17 13:44:03 EDT
Created attachment 168775 [details]
example jpa project

In the attached example project you will see 2 validation errors on the Captain entity. EclipseLink handles this particular use case.

- Embedded IDs that are mapped by a relationship should not specify any attribute overrides.

- The type of the ID mapped by the relationship 'major' does not agree with the primary key class of the target entity.
Comment 1 Neil Hauge CLA 2010-06-03 17:38:26 EDT
Investigate for 2.3.1.
Comment 2 Paul Fullbright CLA 2010-06-28 12:59:37 EDT
The workaround for this is to add a value to the maps id annotation.

@MapsId("major")
Comment 3 Paul Fullbright CLA 2010-06-30 14:50:57 EDT
The workaround is potentially technically incorrect, as EclipseLink (as a reference implementation) represents the default value of the @MapsId as "id", although what happens under the covers seems equivalent.

At any rate, solving this problem in maintenance seems problematic.  It's likely we'll need a more sophisticated API to address this issue, so I'm re-targeting to next release.
Comment 4 Neil Hauge CLA 2011-07-01 16:26:48 EDT
Moving JPA specific bugs to new JPA component in bugzilla.
Comment 5 Neil Hauge CLA 2011-10-07 12:52:08 EDT
Targeting to Juno release.
Comment 6 Paul Fullbright CLA 2013-07-11 14:21:05 EDT
Committed for M1