我從ORMlite文檔中並不聰明。是否可以在類中聲明該參數是外鍵?ORMlite Android外鍵支持
例如我有桌客戶:
@DatabaseTable(tableName = "customer")
public class Customer {
@DatabaseField(id = true)
private String customerName;
@DatabaseField
private String customerSurname;
@DatabaseField(foreign = true)
private String accountNameHolder;
@DatabaseField
private int age;
public Customer() {
}
}
AccountNameHolder應該瞄準來自表Accounts的DatabaseField名稱。怎麼做?我發現只有參數foreign = true,但沒有關於哪個參數和它表示的表。
感謝
如果有幫助,請勾選[this](http://ormlite.com/javadoc/ormlite-core/doc-files/ormlite_2.html#SEC29)。 –
http://ormlite.com/javadoc/ormlite-core/doc-files/ormlite_2.html#Foreign-Objects –