Top Description Methods
jakarta.persistence

public @Interface MapKeyJoinColumns

extends Annotation
Annotations
@Target:METHOD, FIELD
@Retention:RUNTIME
Imports
java.lang.annotation.Target, .Retention

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
2.0
See Also
MapKeyJoinColumn, ForeignKey

Method Summary

Modifier and TypeMethod and Description
public ForeignKey
foreignKey()

(Optional) Used to specify or control the generation of a foreign key constraint when table generation is in effect.

public MapKeyJoinColumn[]
value()

(Required) The map key join columns that are used to map to the entity that is the map key.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

foreignKeyback to summary
public 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 the foreignKey element of any of the MapKeyJoinColumn elements are specified, the behavior is undefined. If no foreignKey annotation element is specified in either location, a default foreign key strategy is selected by the persistence provider.

Since
2.1
valueback to summary
public MapKeyJoinColumn[] value()

(Required) The map key join columns that are used to map to the entity that is the map key.