81,094
社区成员
发帖
与我相关
我的任务
分享
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "USERID", nullable = false)
public TrRole getTrRole() {
return this.trRole;
}
public void setTrRole(TrRole trRole) {
this.trRole = trRole;
}
但是,表B 的bid你如何set get呢?[/quote]
表B的get主要加上,其他的都一致
@OneToMany(mappedBy="TrRole")
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "USERID", nullable = false)
public TrRole getTrRole() {
return this.trRole;
}
public void setTrRole(TrRole trRole) {
this.trRole = trRole;
}
但是,表B 的bid你如何set get呢?