Android GreenDao一对多插入数据后查询到类的列表数据为空,但是我查数据库里面数据是插入进去了的,求大神解决
就是一个类里面有一个list集合,但是get的时候取不出来List 集合
我按照上面的写了1对n,但是get的时候取不出来List 集合
@Entity
public class UserBean {
@ID(autoincrement = true)
private Long id;
@notnull
private String name;
private int age;
private String province;
private boolean isMale;
private String idCard;
private Long otherUserInfoId;
@ToMany(referencedJoinProperty = "otherUserInfoId")
private List otherUserInfoBeans;
}
@Entity
public class OtherUserInfoBean {
@ID(autoincrement = true)
private Long id;
private Long otherUserInfoId;
private String address;
private String tel;
private Date birthday;
}