@Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) public @interface ManyToOne
Example:
@ManyToOne
@JoinColumn(name="CUST_ID", nullable=false, updatable=false)
public Customer getCustomer() { return customer; }
| 限定符和类型 | 可选元素和说明 |
|---|---|
FetchType |
fetch
此功能暂未实现
|
Class |
targetEntity
(Optional) The entity class that is the target of
the association.
|
public abstract Class targetEntity
Defaults to the type of the field or property that stores the association.
public abstract FetchType fetch
Copyright © 2016. All rights reserved.