@Table("user")
public class user {
@Column
@Id
private int id;
@Column
private int name;
@Column
private int rid;
@One(field = "rid", key = "rid")
private role role1;
public int getId() {
return id;
}
@Table("role")
public class role {
@Column
@Id
private int rid;
@Column
private int rname;
List userList = dao.query(user.class, Cnd.where("id", "=", 1));
System.out.println(userList.size());
for(user u:userList){
System.out.println("打印出来的角色" + u.getRole1());
}
为什么打印出来的为空啊