| Summary: | [API] Incorrect validation errors on EclipseLink example of derivied Id? | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Karen Butzke <karenfbutzke> | ||||
| Component: | JPA | Assignee: | Paul Fullbright <paul.fullbright> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | neil.hauge | ||||
| Version: | 2.3 | ||||||
| Target Milestone: | 3.4 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Investigate for 2.3.1. The workaround for this is to add a value to the maps id annotation.
@MapsId("major")
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. Moving JPA specific bugs to new JPA component in bugzilla. Targeting to Juno release. Committed for M1 |
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.