ObjectDB ObjectDB

CollectionTable.joinColumns - JPA annotation element

Annotation Element
javax.persistence.CollectionTable
JoinColumn[] joinColumns

(Optional) The foreign key columns of the collection table which reference the primary table of the entity. The default only applies if a single join column is used. The default is the same as for JoinColumn (i.e., the concatenation of the following: the name of the entity; "_"; the name of the referenced primary key column.) However, if there is more than one join column, a JoinColumn annotation must be specified for each join column using the JoinColumns annotation. In this case, both the name and the referencedColumnName elements must be specified in each such JoinColumn annotation.
Default value:
{}
Since:
JPA 2.0