Annotation Interface JoinTable
Customizes the join table of a
ONE_TO_MANY or MANY_TO_MANY association that is stored in a separate
table. A join table (also called a link table) has one row per linked pair of entities, holding a foreign key to
the owning entity and a foreign key to the associated entity.
Without this annotation, the table name and the column names are derived from the entity and association names by
the NamingStrategy. Use name() and schema() to name the
table, joinColumns() to name the columns that reference the owning entity and
inverseJoinColumns() to name the columns that reference the associated entity. Place the annotation on the
owning side of the association, that is the side without mappedBy.
The JPA annotation jakarta.persistence.JoinTable can be used instead and is interpreted the same way.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescription
-
Element Details
-
name
-
joinColumns
-
inverseJoinColumns
-
alias
-
schema
-