Saving nested foreign objects with ORMLite on Android

后端 未结 4 1451
-上瘾入骨i
-上瘾入骨i 2020-12-07 12:57

When working on Android, does ORMLite only save shallow level objects? I have a data structure with nested Objects, both of which are newly created, and I would like to be a

4条回答
  •  清歌不尽
    2020-12-07 13:15

    Did you try this?

    @DatabaseField(foreign = true, foreignAutoCreate = true, foreignAutoRefresh = true)
    public Child child;
    

    I'm using ORMLite 4.35.

提交回复
热议问题