3.8.7.6.2. Element Join Columns
Element join columns are equivalent to standard JPA join columns, except that they represent a join to a collection or map element entity rather than a direct relation.
You represent an element join column with OpenJPA’s
org.apache.openjpa.persistence.jdbc.ElementJoinColumn
annotation.
To declare a compound join, enclose an array of ElementJoinColumns in the
org.apache.openjpa.persistence.jdbc.ElementJoinColumns
annotation.
An ElementJoinColumn always resides in a container table, so it does not have the table property of a standard JoinColumn.
Like XJoinColumns above, ElementJoinColumns can reference a linked attribute rather than a static linked column.
Otherwise, the ElementJoinColumn and standard JoinColumn annotations are equivalent.
See Direct Relations in the JPA Overview for a review of the JoinColumn annotation.