Open szhupeng opened 8 years ago
@Table("tb_user") public class UserModel extends BaseModel { private static final long serialVersionUID = 1L;
public static final String COL_MOBILE = "mobile"; @NotNull @Column(COL_MOBILE) private String mobile;
@Mapping(Relation.OneToMany) private ArrayList roles; }
@Table("tb_role") public class RoleModel extends BaseModel {
@Unique @NotNull private int roleId; private String role;
} 用 public void insert(T t) { getLiteOrm().cascade().insert(t, ConflictAlgorithm.Abort); } 插入数据userMode,UserModel中其他字段都可以插入,唯独roles是空
~如果解决,请关闭issue
我以前用的是1.7,今天打算换成1.9之后级联插入就失败了,重新换过来又好了
麻烦贴一下异常栈信息
@Table("tb_user") public class UserModel extends BaseModel { private static final long serialVersionUID = 1L;
@Mapping(Relation.OneToMany) private ArrayList roles;
}
@Table("tb_role") public class RoleModel extends BaseModel {
} 用 public void insert(T t) {
getLiteOrm().cascade().insert(t, ConflictAlgorithm.Abort);
}
插入数据userMode,UserModel中其他字段都可以插入,唯独roles是空