【发布时间】:2021-05-18 15:56:21
【问题描述】:
我正在使用 Android Room,我必须使用与多个孩子的关系。我必须使用相同的架构 (How to create a table with a two or more foreign keys using Android Room?) 执行此问题中解释的相同操作,但使用 @Relationship 而不是 @ForeignKey。
我需要这个,因为我必须能够从父亲那里接触到孩子,而无需任何询问。
我查看了文档,但他们只解释了一个孩子 (https://developer.android.com/training/data-storage/room/relationships#nested-relationships) 的情况。
有人可以帮我吗?
感谢您的耐心和帮助!
【问题讨论】:
标签: android android-room relationship