功能:要实现在查找user时同时对于account表中的信息进行查询
account表
user表
两张表的user_id字段相同
1.在实体类中加上要联合查询的数据类型
public class User2 {
private Account account2;
private Integer userId;
private String account;
private Integer identityId;
...
}
account表
user表
public class User2 {
private Account account2;
private Integer userId;
private String account;
private Integer identityId;
...
}