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.
Difference between revisions of "DaliEclipseLinkVariableOneToOneMapping"
(→Variable One To One) |
(→Variable One To One) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 39: | Line 39: | ||
* [[Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Use_the_.40VariableOneToOne_Annotation|@VariableOneToOne]] mappings supported in Entity, MappedSuperclass, and Embeddable classes. | * [[Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Use_the_.40VariableOneToOne_Annotation|@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 | * Mapping defaults to VariableOneToOne if the attribute type is an Interface, not a Map, not a Collection, not a ValueHolderInterface | ||
− | * Target Interface | + | * 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 | * 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 javax.persistence.DiscriminatorColumn type is STRING, it is Entity.name() | ||
Line 49: | 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 | ||
− | ** | + | ** 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] | |
− | ** | + | |
− | + | ||
[[Image: DaliEclipseLinkVariableOneToOneMapping.jpg]] | [[Image: DaliEclipseLinkVariableOneToOneMapping.jpg]] |
Latest revision as of 17:09, 17 July 2008
Contents
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
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.