Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/JPA2.0/nested embedding"

m (Nested Embedding)
m (Work Required)
Line 25: Line 25:
 
==Implementation==
 
==Implementation==
 
==Work Required==
 
==Work Required==
 +
*For all tests verify that both JPA and ORM implementations adhere to the JPA 2.0 specification
 +
*Extend test model in eclipselink.jpa.test
 +
*Add model that includes an @EmbeddedId embedded composite primary key

Revision as of 14:40, 22 September 2008

Nested Embedding

JPA 2.0 Root | Enhancement Request

References

Issue Summary

  • I1: Access type for an embeddable is determined by the entity or the embeddable in which it is embedded - see 2.5 of the spec.

General Solution

Analysis

  • In the JPA 2.0 specification, the following changes to the description of embeddable classes are made.
    • Collections of embeddables are supported
    • @EmbeddedId annotation is used when the the composite primary key of an entity or mapped superclass is an embeddable


Design

Test Model

The following test model from eclipselink.jpa.test/org.eclipse.persistence.testing.models.jpa.complexaggregate.HockeyTeam will be used. The embeddable classes Vitals, TeamVitals and PersonalVitals are bound to their owning Entity (HockeyPlayer) and are not sharable in HockeyTeam or Role.

Nested embeddable uml class.gif

Implementation

Work Required

  • For all tests verify that both JPA and ORM implementations adhere to the JPA 2.0 specification
  • Extend test model in eclipselink.jpa.test
  • Add model that includes an @EmbeddedId embedded composite primary key

Back to the top