Jakarta Persistence (JPA) Annotation Type
jakarta.persistence.PrimaryKeyJoinColumns
- Implemented Interfaces:
Annotation
- Target:
- Type, Method, Field
Groups
PrimaryKeyJoinColumn annotations. It is used to map composite foreign keys. Example: ValuedCustomer subclass
@Entity @Table(name = "VCUST") @DiscriminatorValue("VCUST") @PrimaryKeyJoinColumns({ @PrimaryKeyJoinColumn(name = "CUST_ID", referencedColumnName = "ID"), @PrimaryKeyJoinColumn(name = "CUST_TYPE", referencedColumnName = "TYPE")}) public class ValuedCustomer extends Customer { ... }
- See Also:
- Since:
- Jakarta Persistence (JPA) 1.0
Public Static Fields
No JavaDoc Info for jakarta.persistence.PrimaryKeyJoinColumns/class
Public Instance Methods
If both this element and the
foreignKey element of any of the PrimaryKeyJoinColumn elements are specified, the behavior is undefined. If no foreign key annotation element is specified in either location, a default foreign key strategy is selected by the persistence provider.- Since:
- Jakarta Persistence (JPA) 2.1
- Since:
- Jakarta Persistence (JPA) 1.0
Annotation Elements
This is a marker annotation with no members/elements.
Additional JDK methods inherited from java.lang.annotation.Annotation
java.lang.annotation.Annotation/annotationType(), java.lang.annotation.Annotation/equals(Object), java.lang.annotation.Annotation/hashCode(), java.lang.annotation.Annotation/toString()