litesuits / litesuits/android-lite-orm
实体类中有集合,存不进去
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 359
- PR merge metrics
- No merged PRs in 30d
Description
代码如下,我发现集合类型的字段存不进去,这块应该怎么处理呢?
`@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 examIds;
private int examFilterCount;
@Ignore
private List examFilterIds;
private int doneExamCount;
@Ignore
private List doneExamIds;
private int correctExamCount;
@Ignore
private List correctExamIds;
private String rightRate;
//统计信息
@Mapping(Relation.OneToOne)
private OutlineStatisticVo outlineStatisticVo;
@Mapping(Relation.OneToMany)
private List children;`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the OutlineTreeVo example and inspect how @Mapping(Relation.OneToMany) handles the examIds and children collection fields, along with the @Ignore fields. Reproduce the reported save-and-load behavior and document or fix collection persistence so the supported fields can be stored and retrieved as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100