Deprecated.
Use ElementCollection.
A BasicMap is used to map an DirectMapMapping, which
stores a collection of key-value pairs of simple types (String, Number, Date,
etc.). It is used in conjunction with a CollectionTable which stores the key,
the value and a foreign key to the source object.
A converter may be used if the desired object type and the data type do not
match. This applied to both the key and value of the map.
A BasicMap can be specified within an Entity, MappedSuperclass and Embeddable class.
- See Also:
- Author:
- Guy Pelletier
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionjakarta.persistence.FetchType
Deprecated.Defines whether the value of the field or property should be lazily loaded or must be eagerly fetched.jakarta.persistence.Column
Deprecated.The name of the data column that holds the direct map key.Deprecated.Specify the key converter.jakarta.persistence.Column
Deprecated.The name of the data column that holds the direct collection data.Deprecated.Specify the value converter.
-
Element Details
-
fetch
jakarta.persistence.FetchType fetchDeprecated.Defines whether the value of the field or property should be lazily loaded or must be eagerly fetched. The FetchType.EAGER strategy is a requirement on the persistence provider runtime that the value must be eagerly fetched. The FetchType.LAZY strategy is a hint to the persistence provider runtime.If not specified, defaults to FetchType.LAZY.
- Default:
LAZY
-
keyColumn
jakarta.persistence.Column keyColumnDeprecated.The name of the data column that holds the direct map key.If the name on the key column is
""
, the name will be defaulted to the concatenation of the following:- the name of the property or field
- "
_KEY
"
- Default:
@jakarta.persistence.Column
-
keyConverter
Convert keyConverterDeprecated.Specify the key converter.Default is equivalent to specifying
@Convert("none")
, meaning no converter will be added to the direct map key.- Default:
@org.eclipse.persistence.annotations.Convert
-
valueColumn
jakarta.persistence.Column valueColumnDeprecated.The name of the data column that holds the direct collection data.Default is the property or field name.
- Default:
@jakarta.persistence.Column
-
valueConverter
Convert valueConverterDeprecated.Specify the value converter.Default is equivalent to specifying
@Convert("none")
, meaning no converter will be added to the value column mapping.- Default:
@org.eclipse.persistence.annotations.Convert
-