Package jakarta.persistence
Annotation Type MapKeyJoinColumns
- 
 @Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface MapKeyJoinColumns Supports composite map keys that reference entities.The MapKeyJoinColumnsannotation groupsMapKeyJoinColumnannotations. When theMapKeyJoinColumnsannotation is used, both thenameand thereferencedColumnNameelements must be specified in each of the groupedMapKeyJoinColumnannotations.- Since:
- 2.0
- See Also:
- MapKeyJoinColumn,- ForeignKey
 
- 
- 
Required Element SummaryRequired Elements Modifier and Type Required Element Description MapKeyJoinColumn[]value(Required) The map key join columns that are used to map to the entity that is the map key.
 - 
Optional Element SummaryOptional Elements Modifier and Type Optional Element Description ForeignKeyforeignKey(Optional) Used to specify or control the generation of a foreign key constraint when table generation is in effect.
 
- 
- 
- 
Element Detail- 
valueMapKeyJoinColumn[] value (Required) The map key join columns that are used to map to the entity that is the map key.
 
- 
 - 
- 
foreignKeyForeignKey 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 theforeignKeyelement of any of theMapKeyJoinColumnelements 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:
- 2.1
 - Default:
- @jakarta.persistence.ForeignKey(jakarta.persistence.ConstraintMode.PROVIDER_DEFAULT)
 
 
- 
 
-