标签:column ring ber this too man get 实体类 ret
1.表User id主键,username,password,dept...
表Attendence id主键,uid外键,time...
1 @ManyToOne 2 @JoinColumn(name = "uid",referencedColumnName="id") 3 private User user; 4 5 public User getUser() { 6 return user; 7 } 8 9 public void setUser(User user) { 10 this.user = user; 11 }
2.查询时只需 u.user.id即可
标签:column ring ber this too man get 实体类 ret
原文地址:http://www.cnblogs.com/juin1058/p/6605522.html