This annotation is used in the mapping of associations. It
is specified on the owning side of a many-to-many association,
or in a unidirectional one-to-many association.
If the JoinTable annotation is missing, the
default values of the annotation elements apply. The name
of the join table is assumed to be the table names of the
associated primary tables concatenated together (owning side
first) using an underscore.
Example:
@JoinTable(
name="CUST_PHONE",
joinColumns=
@JoinColumn(name="CUST_ID", referencedColumnName="ID"),
inverseJoinColumns=
@JoinColumn(name="PHONE_ID", referencedColumnName="ID")
)
|