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 "Dali Project/specs/3.0/2.0ElementCollection"
(→Requirements / Functionality) |
(→Requirements / Functionality) |
||
Line 38: | Line 38: | ||
=== Element Collection with Basic Type === | === Element Collection with Basic Type === | ||
− | * | + | * target-class - defaults to type of the Collection if generic, must be specified otherwise |
− | * | + | * fetch - defaults to Lazy |
− | * | + | * collection-table and @CollectionTable |
− | ** | + | ** name defaults to <Entity name>_<attribute name> |
− | * Column | + | * column and @Column |
− | ** | + | ** name default to attribute name |
− | ** | + | ** table defaults to collection table name and is not editable |
+ | ** temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink) | ||
Line 58: | Line 59: | ||
=== Element Collection with Embeddable Type === | === Element Collection with Embeddable Type === | ||
+ | * target-class - defaults to type of the Collection if generic, must be specified otherwise | ||
+ | * fetch - defaults to Lazy | ||
+ | * collection-table and @CollectionTable | ||
+ | ** name defaults to <Entity name>_<attribute name> | ||
*Attribute and Association override names are derived from the Embeddable type | *Attribute and Association override names are derived from the Embeddable type | ||
Line 66: | Line 71: | ||
− | === Element Collection Map Basic | + | === Element Collection Map Basic Key and Basic Value=== |
− | * target-class | + | * target-class - defaults to type of the Map value if generic, must be specified otherwise |
+ | * map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not | ||
+ | * map-key and @MapKey - this and MapKeyClass are mutually exclusive | ||
* fetch - defaults to Lazy | * fetch - defaults to Lazy | ||
* collection-table and @Collection Table | * collection-table and @Collection Table | ||
** Name defaults to <Entity name>_<attribute name> | ** Name defaults to <Entity name>_<attribute name> | ||
− | * column and @Column | + | * Value column definition |
− | * map-key-column and @MapKeyColumn | + | ** column and @Column |
− | * map-key-temporal and @MapKeyTemporal | + | ** temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink) |
− | * map-key-enumerated and @MapKeyEnumerated | + | * Key column definition |
− | * map-key-convert and @MapKeyConvert | + | ** map-key-column and @MapKeyColumn |
− | + | ** map-key-temporal and @MapKeyTemporal | |
− | + | ** map-key-enumerated and @MapKeyEnumerated | |
+ | ** map-key-convert and @MapKeyConvert | ||
* Validation errors: | * Validation errors: | ||
** MapKey and MapKeyClass are both specified | ** MapKey and MapKeyClass are both specified | ||
− | + | ||
'''Element Collection Map with Basic Key and Basic Value Details''' | '''Element Collection Map with Basic Key and Basic Value Details''' | ||
Line 86: | Line 94: | ||
[[Image: ElementCollectionMapBasicKeyAndValue.jpg]] | [[Image: ElementCollectionMapBasicKeyAndValue.jpg]] | ||
− | === Element Collection Map Embeddable Key === | + | === Element Collection Map Embeddable Key and Basic value === |
− | * | + | * target-class - defaults to type of the Map value if generic, must be specified otherwise |
+ | * fetch - defaults to Lazy | ||
+ | * collection-table and @Collection Table | ||
+ | ** Name defaults to <Entity name>_<attribute name> | ||
+ | * map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not | ||
+ | * map-key and @MapKey - this and MapKeyClass are mutually exclusive | ||
+ | * Value column definition | ||
+ | ** column and @Column | ||
+ | ** temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink) | ||
+ | * Key overrides | ||
** In Xml use map-key-attribute-override and map-key-association-override | ** In Xml use map-key-attribute-override and map-key-association-override | ||
** In Java use AttributeOverride(name="key.<name>") and AttributeOverride(name="value.<name>) | ** In Java use AttributeOverride(name="key.<name>") and AttributeOverride(name="value.<name>) | ||
Line 94: | Line 111: | ||
[[Image: ElementCollectionMapEmbeddableKeyAndBasicValue.jpg]] | [[Image: ElementCollectionMapEmbeddableKeyAndBasicValue.jpg]] | ||
− | === Element Collection Map Entity Key === | + | === Element Collection Map Entity Key and Basic Value=== |
− | * MapKeyJoinColumn | + | * target-class - defaults to type of the Map value if generic, must be specified otherwise |
− | * MapKeyJoinColumns | + | * fetch - defaults to Lazy |
+ | * collection-table and @Collection Table | ||
+ | ** Name defaults to <Entity name>_<attribute name> | ||
+ | * map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not | ||
+ | * map-key and @MapKey - this and MapKeyClass are mutually exclusive | ||
+ | * Value column definition | ||
+ | ** column and @Column | ||
+ | ** temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink) | ||
+ | * Key column definition | ||
+ | ** map-key-join-column and @MapKeyJoinColumn | ||
+ | ** @MapKeyJoinColumns | ||
[[Image: ElementCollectionMapEntityKeyAndBasicValue.jpg]] | [[Image: ElementCollectionMapEntityKeyAndBasicValue.jpg]] | ||
+ | |||
+ | |||
+ | === Element Collection Map Basic Key and Embeddable Value=== | ||
+ | * target-class - defaults to type of the Map value if generic, must be specified otherwise | ||
+ | * map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not | ||
+ | * map-key and @MapKey - this and MapKeyClass are mutually exclusive | ||
+ | * fetch - defaults to Lazy | ||
+ | * collection-table and @Collection Table | ||
+ | ** Name defaults to <Entity name>_<attribute name> | ||
+ | * Value overrides | ||
+ | ** In Xml attribute-override, in Java @AttributeOverride | ||
+ | ** In Xml association-override, in Java @AssociationOverride | ||
+ | * Key column definition | ||
+ | ** map-key-column and @MapKeyColumn | ||
+ | ** map-key-temporal and @MapKeyTemporal | ||
+ | ** map-key-enumerated and @MapKeyEnumerated | ||
+ | ** map-key-convert and @MapKeyConvert | ||
+ | * Validation errors: | ||
+ | ** MapKey and MapKeyClass are both specified | ||
+ | |||
+ | |||
+ | '''Element Collection Map with Basic Key and Embeddable Value Details''' | ||
+ | |||
+ | [[Image: ElementCollectionMapBasicKeyAndEmbeddableValue.jpg]] | ||
+ | |||
+ | |||
+ | === Element Collection Map Embeddable Key and Embeddable value === | ||
+ | * target-class - defaults to type of the Map value if generic, must be specified otherwise | ||
+ | * fetch - defaults to Lazy | ||
+ | * collection-table and @Collection Table | ||
+ | ** Name defaults to <Entity name>_<attribute name> | ||
+ | * map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not | ||
+ | * map-key and @MapKey - this and MapKeyClass are mutually exclusive | ||
+ | * Value overrides | ||
+ | ** In Xml attribute-override, in Java @AttributeOverride | ||
+ | ** In Xml association-override, in Java @AssociationOverride | ||
+ | * Key overrides | ||
+ | ** In Xml use map-key-attribute-override and map-key-association-override | ||
+ | ** In Java use AttributeOverride(name="key.<name>") and AttributeOverride(name="value.<name>) | ||
+ | |||
+ | |||
+ | [[Image: ElementCollectionMapEmbeddableKeyAndEmbeddableValue.jpg]] | ||
+ | |||
+ | === Element Collection Map Entity Key and Embeddable Value=== | ||
+ | * target-class - defaults to type of the Map value if generic, must be specified otherwise | ||
+ | * fetch - defaults to Lazy | ||
+ | * collection-table and @Collection Table | ||
+ | ** Name defaults to <Entity name>_<attribute name> | ||
+ | * map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not | ||
+ | * map-key and @MapKey - this and MapKeyClass are mutually exclusive | ||
+ | * Value overrides | ||
+ | ** In Xml attribute-override, in Java @AttributeOverride | ||
+ | ** In Xml association-override, in Java @AssociationOverride | ||
+ | * Key column definition | ||
+ | ** map-key-join-column and @MapKeyJoinColumn | ||
+ | ** @MapKeyJoinColumns | ||
+ | |||
+ | [[Image: ElementCollectionMapEntityKeyAndEmbeddableValue.jpg]] | ||
== API == | == API == |
Revision as of 16:35, 14 December 2009
Contents
- 1 Functional Specification: Dali Support for JPA 2.0 Element Collection mapping
- 1.1 Document History
- 1.2 Project overview
- 1.3 Concepts
- 1.4 Requirements / Functionality
- 1.4.1 Element Collection with Basic Type
- 1.4.2 Element Collection with Embeddable Type
- 1.4.3 Element Collection Map Basic Key and Basic Value
- 1.4.4 Element Collection Map Embeddable Key and Basic value
- 1.4.5 Element Collection Map Entity Key and Basic Value
- 1.4.6 Element Collection Map Basic Key and Embeddable Value
- 1.4.7 Element Collection Map Embeddable Key and Embeddable value
- 1.4.8 Element Collection Map Entity Key and Embeddable Value
- 1.5 API
- 1.6 Issues
- 1.7 Future Considerations
Functional Specification: Dali Support for JPA 2.0 Element Collection mapping
bug 258490 - element collection support
Document History
Date | Author | Version Description & Notes |
---|---|---|
12-9-2009 | Karen Butzke | Draft |
Project overview
This feature covers the element collection mapping in the JPA 2.0 spec as well as any EclipseLink extensions.
Goals:
- Add Generic 2.0 support for Element Collection
- Add EclipseLink 3.0 support for Element Collection with relevant extensions
- Provide the appropriate defaults and validation for these settings
Concepts
Present any concepts relevant to the feature.
EclipseLink Element Collection Functional Spec
Requirements / Functionality
Element Collection with Basic Type
- target-class - defaults to type of the Collection if generic, must be specified otherwise
- fetch - defaults to Lazy
- collection-table and @CollectionTable
- name defaults to <Entity name>_<attribute name>
- column and @Column
- name default to attribute name
- table defaults to collection table name and is not editable
- temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink)
Element Collection Basic Type Details
Ordering Section
Element Collection with Embeddable Type
- target-class - defaults to type of the Collection if generic, must be specified otherwise
- fetch - defaults to Lazy
- collection-table and @CollectionTable
- name defaults to <Entity name>_<attribute name>
- Attribute and Association override names are derived from the Embeddable type
Element Collection Embeddable Type Details
Element Collection Map Basic Key and Basic Value
- target-class - defaults to type of the Map value if generic, must be specified otherwise
- map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not
- map-key and @MapKey - this and MapKeyClass are mutually exclusive
- fetch - defaults to Lazy
- collection-table and @Collection Table
- Name defaults to <Entity name>_<attribute name>
- Value column definition
- column and @Column
- temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink)
- Key column definition
- map-key-column and @MapKeyColumn
- map-key-temporal and @MapKeyTemporal
- map-key-enumerated and @MapKeyEnumerated
- map-key-convert and @MapKeyConvert
- Validation errors:
- MapKey and MapKeyClass are both specified
Element Collection Map with Basic Key and Basic Value Details
Element Collection Map Embeddable Key and Basic value
- target-class - defaults to type of the Map value if generic, must be specified otherwise
- fetch - defaults to Lazy
- collection-table and @Collection Table
- Name defaults to <Entity name>_<attribute name>
- map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not
- map-key and @MapKey - this and MapKeyClass are mutually exclusive
- Value column definition
- column and @Column
- temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink)
- Key overrides
- In Xml use map-key-attribute-override and map-key-association-override
- In Java use AttributeOverride(name="key.<name>") and AttributeOverride(name="value.<name>)
File:ElementCollectionMapEmbeddableKeyAndBasicValue.jpg
Element Collection Map Entity Key and Basic Value
- target-class - defaults to type of the Map value if generic, must be specified otherwise
- fetch - defaults to Lazy
- collection-table and @Collection Table
- Name defaults to <Entity name>_<attribute name>
- map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not
- map-key and @MapKey - this and MapKeyClass are mutually exclusive
- Value column definition
- column and @Column
- temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink)
- Key column definition
- map-key-join-column and @MapKeyJoinColumn
- @MapKeyJoinColumns
Element Collection Map Basic Key and Embeddable Value
- target-class - defaults to type of the Map value if generic, must be specified otherwise
- map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not
- map-key and @MapKey - this and MapKeyClass are mutually exclusive
- fetch - defaults to Lazy
- collection-table and @Collection Table
- Name defaults to <Entity name>_<attribute name>
- Value overrides
- In Xml attribute-override, in Java @AttributeOverride
- In Xml association-override, in Java @AssociationOverride
- Key column definition
- map-key-column and @MapKeyColumn
- map-key-temporal and @MapKeyTemporal
- map-key-enumerated and @MapKeyEnumerated
- map-key-convert and @MapKeyConvert
- Validation errors:
- MapKey and MapKeyClass are both specified
Element Collection Map with Basic Key and Embeddable Value Details
File:ElementCollectionMapBasicKeyAndEmbeddableValue.jpg
Element Collection Map Embeddable Key and Embeddable value
- target-class - defaults to type of the Map value if generic, must be specified otherwise
- fetch - defaults to Lazy
- collection-table and @Collection Table
- Name defaults to <Entity name>_<attribute name>
- map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not
- map-key and @MapKey - this and MapKeyClass are mutually exclusive
- Value overrides
- In Xml attribute-override, in Java @AttributeOverride
- In Xml association-override, in Java @AssociationOverride
- Key overrides
- In Xml use map-key-attribute-override and map-key-association-override
- In Java use AttributeOverride(name="key.<name>") and AttributeOverride(name="value.<name>)
Element Collection Map Entity Key and Embeddable Value
- target-class - defaults to type of the Map value if generic, must be specified otherwise
- fetch - defaults to Lazy
- collection-table and @Collection Table
- Name defaults to <Entity name>_<attribute name>
- map-key-class and @MapKeyClass - defaults to the type of the Map key if generic, must be specified otherwise and if MapKey is not
- map-key and @MapKey - this and MapKeyClass are mutually exclusive
- Value overrides
- In Xml attribute-override, in Java @AttributeOverride
- In Xml association-override, in Java @AssociationOverride
- Key column definition
- map-key-join-column and @MapKeyJoinColumn
- @MapKeyJoinColumns
File:ElementCollectionMapEntityKeyAndEmbeddableValue.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.