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 "Dali Project/specs/3.0/2.0ElementCollection"

(Element Collection Map Embeddable Key and Basic value)
(Requirements / Functionality)
Line 94: Line 94:
 
[[Image: ElementCollectionMapBasicKeyAndValue.jpg]]
 
[[Image: ElementCollectionMapBasicKeyAndValue.jpg]]
  
=== Element Collection Map Embeddable Key and Basic value ===
+
 
 +
=== Element Collection Map Embeddable Key and Embeddable value ===
 
* target-class - defaults to type of the Map value if generic, must be specified otherwise
 
* target-class - defaults to type of the Map value if generic, must be specified otherwise
 
* fetch - defaults to Lazy
 
* fetch - defaults to Lazy
Line 101: Line 102:
 
* 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-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
 
* map-key and @MapKey - this and MapKeyClass are mutually exclusive
* Value column definition
+
* Value overrides
** column and @Column
+
** In Xml attribute-override, in Java @AttributeOverride
** temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink)
+
** In Xml association-override, in Java @AssociationOverride
 
* Key overrides
 
* 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
Line 109: Line 110:
  
  
Screen shot is similar to others with the Map Value section having column and type and the Map Key section having overrides
+
[[Image: ElementCollectionMapEmbeddableKeyAndEmbeddableValue.jpg]]
  
=== Element Collection Map Entity Key and Basic Value===
+
 
 +
=== Element Collection Map Embeddable Key and Basic value ===
 
* target-class - defaults to type of the Map value if generic, must be specified otherwise
 
* target-class - defaults to type of the Map value if generic, must be specified otherwise
 
* fetch - defaults to Lazy
 
* fetch - defaults to Lazy
Line 121: Line 123:
 
** column and @Column
 
** column and @Column
 
** temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink)
 
** temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink)
* Key column definition
+
* Key overrides
** map-key-join-column and @MapKeyJoinColumn
+
** In Xml use map-key-attribute-override and map-key-association-override
** @MapKeyJoinColumns
+
** In Java use AttributeOverride(name="key.<name>") and AttributeOverride(name="value.<name>)
  
[[Image: ElementCollectionMapEntityKeyAndBasicValue.jpg]]
+
 
 +
Screen shot is similar to others with the Map Value section having column and type and the Map Key section having overrides
  
  
Line 148: Line 151:
 
Screen shot is similar to others with the Map Value section having overrides and the Map Key having column and type
 
Screen shot is similar to others with the Map Value section having overrides and the Map Key having column and type
  
=== Element Collection Map Embeddable Key and Embeddable value ===
+
 
 +
=== Element Collection Map Entity Key and Basic Value===
 
* target-class - defaults to type of the Map value if generic, must be specified otherwise
 
* target-class - defaults to type of the Map value if generic, must be specified otherwise
 
* fetch - defaults to Lazy
 
* fetch - defaults to Lazy
Line 155: Line 159:
 
* 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-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
 
* map-key and @MapKey - this and MapKeyClass are mutually exclusive
* Value overrides
+
* Value column definition
** In Xml attribute-override, in Java @AttributeOverride
+
** column and @Column
** In Xml association-override, in Java @AssociationOverride
+
** temporal @Temporal, enumerated @Enumberated, lob @Lob, convert @Convert (EclipseLink)
* Key overrides
+
* Key column definition
** In Xml use map-key-attribute-override and map-key-association-override
+
** map-key-join-column and @MapKeyJoinColumn
** In Java use AttributeOverride(name="key.<name>") and AttributeOverride(name="value.<name>)
+
** @MapKeyJoinColumns
  
 +
[[Image: ElementCollectionMapEntityKeyAndBasicValue.jpg]]
  
[[Image: ElementCollectionMapEmbeddableKeyAndEmbeddableValue.jpg]]
 
  
 
=== Element Collection Map Entity Key and Embeddable Value===
 
=== Element Collection Map Entity Key and Embeddable Value===
Line 179: Line 183:
 
** @MapKeyJoinColumns
 
** @MapKeyJoinColumns
  
Screen shot is similar to others with the 'Map Valu'e section having overrides and the 'Map Key' section having join columns
+
Screen shot is similar to others with the 'Map Value' section having overrides and the 'Map Key' section having join columns
  
 
== API ==
 
== API ==

Revision as of 11:14, 15 December 2009

Functional Specification: Dali Support for JPA 2.0 Element Collection mapping

Feedback

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

ElementCollectionBasicType.jpg


Ordering Section

Ordering.jpg

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

ElementCollectionEmbeddableType.jpg


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

ElementCollectionMapBasicKeyAndValue.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>)


ElementCollectionMapEmbeddableKeyAndEmbeddableValue.jpg


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>)


Screen shot is similar to others with the Map Value section having column and type and the Map Key section having overrides


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

Screen shot is similar to others with the Map Value section having overrides and the Map Key having column and type


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

ElementCollectionMapEntityKeyAndBasicValue.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

Screen shot is similar to others with the 'Map Value' section having overrides and the 'Map Key' section having join columns

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.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.