FileDocCategorySizeDatePackage
JoinColumns.javaAPI DocGlassfish v2 API3047Fri May 04 22:34:06 BST 2007javax.persistence

JoinColumns

public class JoinColumns
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; }
since
Java Persistence 1.0

Fields Summary
Constructors Summary
Methods Summary
javax.persistence.JoinColumn[]value()