Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "DaliEclipseLinkVariableOneToOneMapping"

(Variable One To One)
(Variable One To One)
 
(One intermediate revision by the same user not shown)
Line 51: Line 51:
 
** if none specified then there is one default JoinColumn with name=id and referencedColumnName=[attributeName]_"ID"
 
** if none specified then there is one default JoinColumn with name=id and referencedColumnName=[attributeName]_"ID"
 
* Questions
 
* Questions
** Are we going to create a new annotation for the foreignKey->queryKey associations instead of reusing JoinColumn? [http://bugs.eclipse.org/240545 bug 240545]
+
** Will EclipseLink create a new annotation for foreignKey->queryKey associations instead of reusing JoinColumn? [http://bugs.eclipse.org/240545 bug 240545]
 
** Editing of Query Keys will be provided in [http://bugs.eclipse.org/211306 bug 211306]
 
** Editing of Query Keys will be provided in [http://bugs.eclipse.org/211306 bug 211306]
  

Latest revision as of 17:09, 17 July 2008

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

Goals:

  • 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

Concepts

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

DaliEclipseLinkVariableOneToOneMapping.jpg

MWVariableOneToOneClassIndicator.jpg

MWVariableOneToOneQueryKeyAssociations.jpg

API

Issues

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.

Back to the top