Package javax.persistence
Annotation Interface MapKeyJoinColumns
Supports composite map keys that reference entities.
The MapKeyJoinColumns
annotation groups
MapKeyJoinColumn
annotations. When the
MapKeyJoinColumns
annotation is used, both the
name
and the referencedColumnName
elements must be specified in each of the grouped
MapKeyJoinColumn
annotations.
- Since:
- Java Persistence 2.0
- See Also:
-
Required Element Summary
Modifier and TypeRequired ElementDescription(Required) The map key join columns that are used to map to the entity that is the map key. -
Optional Element Summary
Modifier and TypeOptional ElementDescription(Optional) Used to specify or control the generation of a foreign key constraint when table generation is in effect.
-
Element Details
-
value
MapKeyJoinColumn[] value(Required) The map key join columns that are used to map to the entity that is the map key.
-
-
-
foreignKey
ForeignKey foreignKey(Optional) Used to specify or control the generation of a foreign key constraint when table generation is in effect. If both this element and theforeignKey
element of any of theMapKeyJoinColumn
elements are specified, the behavior is undefined. If no foreign key annotation element is specified in either location, the persistence provider's default foreign key strategy will apply.- Since:
- Java Persistence 2.1
- Default:
- @javax.persistence.ForeignKey(PROVIDER_DEFAULT)
-