litesuits / litesuits/android-lite-orm

无法保存树形结构数据

Open
#66 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.5k
Forks
359
PR merge metrics
No merged PRs in 30d

Description

@Table("tb_people")
public class People {

@PrimaryKey(AssignType.AUTO_INCREMENT)
private long id; //ID
@Mapping(Relation.OneToMany)
private ArrayList child;
}

例如上面的类型,进行级联保存后查询DB文件,保存关系映射的表只有一个字段:ID

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the People entity and its @Mapping(Relation.OneToMany) child field, then trace the cascade-save path used before inspecting the SQLite database. Reproduce the example and compare the persisted relation mapping with the expected child relationships; done means the tree structure is stored rather than only an ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sqlite
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.