SELECT per.* FROM Personne per WHERE per.site.xxx=?
关系的中间表,不需要建立entity。直接在ManyToOne和OneToMany中设置
你的KeyValuePK里面的内容,直接添加就可以!public class BillTbodyPK implements Serializable {
private static final long serialVersionUID = -1190986010439330142L
private SingleInfo mid
private BillHeadModel billId
public BillTbodyPK() {
}
// setter getter
@ManyToOne(fetch = FetchType.LAZY,cascade = { CascadeType.ALL })
@JoinColumn(name = "mid", referencedColumnName = "mid", unique = false, nullable = false, insertable = false, updatable = false)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public SingleInfo getMid() {
return mid
}
public void setMid(SingleInfo mid) {
this.mid = mid
}
@ManyToOne
@JoinColumn(name = "dj_id", nullable = false)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public BillHeadModel getBillId() {
return billId
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)