Jump to: navigation, search


Revision as of 16:09, 17 July 2008 by Karen.moore.oracle.com (Talk | contribs) (Variable One To One)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Functional Specification: Dali Support for EclipseLink Variable One To One Mapping

bug 238467 - variable one to one mapping support

Document History

Date Author Version Description & Notes
6-25-2008 Karen Butzke Draft

Project overview

This feature adds Variable One To One mapping support to the EclipseLink JPA platform


  • Add JPA Details view widgets for the VariableOneToOne annotation
  • Add JPA Details view widgets for eclipselink-orm.xml variable-one-to-one elements
  • Provide the appropriate defaults and validation for this mapping


Present any concepts relevant to the feature.

EclipseLink Variable One To One annotation documentation

Requirements / Functionality

Variable One To One

  • @VariableOneToOne mappings supported in Entity, MappedSuperclass, and Embeddable classes.
  • Mapping defaults to VariableOneToOne if the attribute type is an Interface, not a Map, not a Collection, not a ValueHolderInterface
  • Target Interface
    • Defaults to the type of the referenced object
    • Is not an Entity, but 1 or more entities in the persistence unit must implement the interface, validation for this.
  • Discriminator Classes default for any entity in the persistence unit that implements the target interface
    • If the javax.persistence.DiscriminatorColumn type is STRING, it is Entity.name()
    • If the DiscriminatorColumn type is CHAR, it is the first letter of the Entity class
    • If the DiscriminatorColumn type is INTEGER it is the next integer after the highest integer explicitly added.
  • Join Columns
    • name is the foreign key field
    • referenceColumnName is the query key name
    • if none specified then there is one default JoinColumn with name=id and referencedColumnName=[attributeName]_"ID"
  • Questions
    • Will EclipseLink create a new annotation for foreignKey->queryKey associations instead of reusing JoinColumn? bug 240545
    • Editing of Query Keys will be provided in bug 211306






This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.

Issue # Owner Description / Notes Decision

Future Considerations

During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.