|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
javax.persistence Annotation Type JoinColumns
Implements:
Annotation
@Target(value={METHOD, FIELD})@Retention(value=RUNTIME)
定义复合外键的映射。此注释组合了同一关系的
JoinColumn
注释。
使用 JoinColumns
注释时,每个此类 JoinColumn
注释都必须指定 name
和 referencedColumnName
元素。
示例: @ManyToOne @JoinColumns({ @JoinColumn(name="ADDR_ID", referencedColumnName="ID"), @JoinColumn(name="ADDR_ZIP", referencedColumnName="ZIP") }) public Address getAddress() { return address; }
since |
|
Defines mapping for the composite foreign keys. This annotation
groups JoinColumn
annotations for the same relationship.
When the JoinColumns
annotation is used,
both the name
and the 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
Required Element Summary | |
---|---|
JoinColumn[] |
value
|
Element Detail |
---|
abstract public JoinColumn[]
value()
英文文档:
value
public abstract JoinColumn[] value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!