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