| Defines mapping for the composite foreign keys. This annotation
groups
JoinColumn annotations for the same relationship.
When the JoinColumns annotation is used,
both the
JoinColumn.name name and the
JoinColumn.referencedColumnName referencedColumnName elements
must be specified in each such
JoinColumn annotation.
Example:
@ManyToOne
@JoinColumns({
@JoinColumn(name="ADDR_ID", referencedColumnName="ID"),
@JoinColumn(name="ADDR_ZIP", referencedColumnName="ZIP")
})
public Address getAddress() { return address; }
since: Java Persistence 1.0 |