Functional Specification: Dali Support for EclipseLink Variable One To One Mapping
bug 238467 - variable one to one mapping support
|Date||Author||Version Description & Notes|
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.
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
- 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"
- Is the target interface supposed to be an Entity? That does not appear to be the case
- Are we going to create a new interface for the foreignKey->queryKey associations instead of reusing JoinColumn?
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|
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.