クラス オブジェクトの配列リストを ormlite データベースに保存しようとしていますが、エラー java.lang.IllegalArgumentException: No fields have DatabaseField annotation in class java.util.ArrayList が発生しています
私のコードは
@DatabaseTable
public class ManageModelDetails {
@DatabaseField(generatedId = true)
private int id;
@DatabaseField(foreign = true, foreignAutoRefresh = true)
private ArrayList<ModelDetails> listModelDetails;
// ===============================================
public ManageModelDetails() {
super();
}
// ===============================================
public ManageModelDetails(int id, ArrayList<ModelDetails> listModelDetails) {
super();
this.id = id;
this.listModelDetails = listModelDetails;
}
// ===============================================
public void setId(int id) {
this.id = id;
}
public int getId() {
return id;
}
public void setModelList(ArrayList<ModelDetails> listModelDetails) {
this.listModelDetails = listModelDetails;
}
public ArrayList<ModelDetails> getModelList() {
return listModelDetails;
}
}