One-To-Many relationship in ORMLite Android

后端 未结 3 813
滥情空心
滥情空心 2021-02-08 09:53

How do I implement one-many relationship in ORMLite Android?

please find the example

public class A {
 private String name;
    @DatabaseField (foreign =         


        
3条回答
  •  孤街浪徒
    2021-02-08 10:23

    You have to override the DAO of the B class, so when an object B is created or updated, the objects in the collection to be also updated.

    Take a look at this question: Collections in ORMLite.

提交回复
热议问题