Open lxc7923 opened 7 years ago
代码如下,我发现集合类型的字段存不进去,这块应该怎么处理呢? `@Table("OutlineTreeTest2") public class OutlineTreeVo implements Serializable {
@PrimaryKey(AssignType.BY_MYSELF) private int outlineId; private String outlineName; private int sequence; private int hierarchyId; private int parentId; private int initialId;//大纲初始ID private String status; private int examCount; @Mapping(Relation.OneToMany) private List<Long> examIds; private int examFilterCount; @Ignore private List<Long> examFilterIds; private int doneExamCount; @Ignore private List<Long> doneExamIds; private int correctExamCount; @Ignore private List<Long> correctExamIds; private String rightRate; //统计信息 @Mapping(Relation.OneToOne) private OutlineStatisticVo outlineStatisticVo; @Mapping(Relation.OneToMany) private List<OutlineTreeVo> children;`
你的集合是抽象类,不可以被具象化和实例化。数据存储对象需要使用具体容积ArrayList等。
不需要啊。我的就没有使用具体的arrayList。这个是 不同版本的原因嘛?? 我的是Parcelable 序列化之后,就不能存数据了。。
代码如下,我发现集合类型的字段存不进去,这块应该怎么处理呢? `@Table("OutlineTreeTest2") public class OutlineTreeVo implements Serializable {