在表'tablename'中找不到领域字段'fieldname'

时间:2019-06-18 11:35:26

标签: java android mobile realm

  

无效查询:在表'SchoolEventsObject'中找不到字段'eventdatemodel'

@SerializedName("eventtitle")
@Expose
String eventtitle;

@PrimaryKey
@SerializedName("eventdatebs")
@Expose
String eventdatebs;

@SerializedName("description")
@Expose
String description;

@SerializedName("eventtypename")
@Expose
String eventtypename;

@SerializedName("eventdatemodel")
@Expose
String eventDatemodel;
java.lang.IllegalArgumentException: Invalid query: field 'eventdatemodel' not found in table 'SchoolEventsObject'.
        at io.realm.internal.fields.CachedFieldDescriptor.compileFieldDescription(CachedFieldDescriptor.java:79)
        at io.realm.internal.fields.FieldDescriptor.compileIfNecessary(FieldDescriptor.java:285)
        at io.realm.internal.fields.FieldDescriptor.getColumnIndices(FieldDescriptor.java:178)
        at io.realm.RealmQuery.equalToWithoutThreadValidation(RealmQuery.java:257)
        at io.realm.RealmQuery.equalTo(RealmQuery.java:252)
        at io.realm.RealmQuery.equalTo(RealmQuery.java:237)
        at com.codelogictechnologies.schoolapp.events.EventsPresenter.requestDataFromDatabase(EventsPresenter.java:49)
        at com.codelogictechnologies.schoolapp.events.EventsPresenter.requestData(EventsPresenter.java:39)
        at com.codelogictechnologies.schoolapp.events.EventsActivity$2.run(EventsActivity.java:147)

0 个答案:

没有答案