Open 740638339 opened 7 years ago
@Table("product") public class ProductMdl implements Serializable {
@Unique @PrimaryKey(AssignType.AUTO_INCREMENT) private int id; @Column("proName") private String proName; @Column("proPrice") private String proPrice; @Column("proNum") private String proNum; @Column("proPhotoUrl") private String proPhotoUrl;
}
@Table("tablePro") public class TableProMdl implements Serializable { /* */ @Unique @PrimaryKey(AssignType.AUTO_INCREMENT) private int id;
private static final long serialVersionUID = -5204190870608983058L; @Column("tableTitle") private String mTableTitle; @Column("proTotal") private String mProTotal; @Mapping(Relation.OneToMany) private List<ProductMdl> mProList;
tablePro这个表中 插入数据其他字段都可以插入,mProList 插入不了!
使用的是lite-orm-1.9.2.jar
你的List是抽象的,需要具象化。比如用ArrayList
但是用1.8.1的版本就可以直接插入 我刚才也是遇到这个 问题 更换了一个jar版本之后就好了
@Table("product") public class ProductMdl implements Serializable {
}
@Table("tablePro") public class TableProMdl implements Serializable { /* */ @Unique @PrimaryKey(AssignType.AUTO_INCREMENT) private int id;
}
tablePro这个表中 插入数据其他字段都可以插入,mProList 插入不了!