| Summary: | Nested embeddables can't be used as embedded ids | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Sabine Heider <sabine.heider> | ||||||||
| Component: | Eclipselink | Assignee: | Guy Pelletier <guy.pelletier> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P2 | CC: | adrian.goerler, eclipselink.orm-inbox, guy.pelletier, tom.ware | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows Vista | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Created attachment 185254 [details]
Proposed changes
Created attachment 185452 [details]
Updated patch
Updated after review from Gordon Yorke.
Changes submitted. Reviewed by: Gordon Yorke Tests: New test NestedAggregatePrimaryKeyTest added to FullRegressionTestSuite under JPA Tests/CMP3ComplexAggregateTestModel/ Created attachment 186928 [details]
activate model classes with nested embeddables in WDF test suite
WDF tests switched on with rev #8842 Tested on MaxDB, MySQL The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Nested embeddables can't be used as embedded ids. When trying to do so, a validation exception [EclipseLink-7298] is thrown. I tried the following mapping, which at least to my understanding of JPA 2 should be valid: @Entity public class Project { @EmbeddedId private ProjectId id; private String description; //... } @Embeddable public class ProjectId { @Embedded private DeptId dept; private String name; //... } @Embeddable public class DeptId { private int number; private String country; //... }