如何为多个子列设置外键关系

时间:2018-10-06 21:28:55

标签: android-room

我可以制作一个具有外键关系的房间模型实体,如下所示。

 @Entity(foreignKeys = @ForeignKey(entity = fooClass.class,
         parentColumns = "class",
         childColumns = "foo",
         onDelete = ForeignKey.CASCADE))
 public class IncorrectDefinitions {
 }

如何在此外键中添加两个子列?

 @Entity(foreignKeys = @ForeignKey(entity = fooClass.class,
         parentColumns = "class",
         childColumns = "foo", "bar?",
         onDelete = ForeignKey.CASCADE))
 public class IncorrectDefinitions {
 } 

0 个答案:

没有答案