-1
我有ormlite在android中堅持我的數據。 我有這個錯誤:ORMLite與收集崩潰
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.firext.android/com.firext.android.activities.reportList.ReportListActivity}: java.lang.RuntimeException: java.sql.SQLException: Foreign collection class com.firext.android.model.bbdd.DBQuestionsGroup for field 'questionsGroup' column-name does not contain a foreign field named 'questionsGroupsList' of class com.firext.android.model.bbdd.DBQuestions
我的課其本;
@DatabaseTable
public class DBQuestionsGroup {
@DatabaseField(generatedId = true, columnName = "_id")
private Long ID;
@DatabaseField(columnName = "times")
private int times;
@DatabaseField(columnName = "idQuestionsGroup")
private int idQuestionsGroup;
@DatabaseField(columnName = "nameQuestionsGroup")
private String nameQuestionsGroup;
@ForeignCollectionField
private Collection<DBQuestion> questionsGroupsList;
getters and setter
@DatabaseTable
public class DBQuestion {
@DatabaseField(generatedId = true, columnName = "_id")
private int ID;
@DatabaseField(columnName = "question")
private String question;
@DatabaseField(columnName = "questionOrder")
private int questionOrder;
@DatabaseField(foreign = true,foreignAutoCreate = true)
private DBReplieType replyType;
@DatabaseField(columnName = "idQuestion")
private int idQuestion;
@DatabaseField(foreign = true, foreignAutoRefresh= true)
private DBQuestionsGroup DBQuestion;
什麼問題?