@Entity
public class Employee {
@Id private int id;
private String name;
@ManyToMany
@JoinTable(name="EMP_PROJ",
joinColumns=@JoinColumn(name="EMP_ID"),
inverseJoinColumns=@JoinColumn(name="PROJ_ID"))
private Collection
// ...
}
---------------------------------------------------------------------------------------------------------------------
@Entity
public class Employee {
@Id private int id;
private String name;
@OneToMany
@JoinTable(name="EMP_PHONE",
joinColumns=@JoinColumn(name="EMP_ID"),
inverseJoinColumns=@JoinColumn(name="PHONE_ID"))
private Collection
// ...
}
No comments:
Post a Comment