When I add a new field to a model and then reference it in my Java model as such:
@Field
String newField
I get an error on the generated block in the "fromCursor" function:
java.lang.IllegalStateException: Couldn't read row 0, col 16 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
at android.database.CursorWindow.nativeGetString(Native Method)
at android.database.CursorWindow.getString(CursorWindow.java:438)
at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
at -redacted-$$ModelHelper.fromCursor(CustomModel$$ModelHelper.java:70)
at -redacted-$$ModelHelper.fromCursor(CustomModel$$ModelHelper.java:11)
at com.contentful.vault.SqliteHelper.fromCursor(SqliteHelper.java:145)
at com.contentful.vault.QueryResolver.all(QueryResolver.java:51)
at com.contentful.vault.FetchQuery.resolveAll(FetchQuery.java:30)
at com.contentful.vault.FetchQuery.resolveFirst(FetchQuery.java:37)
at com.contentful.vault.LinkResolver.resourceForLink(LinkResolver.java:197)
at com.contentful.vault.LinkResolver.getCachedResourceOrFetch(LinkResolver.java:96)
at com.contentful.vault.LinkResolver.resolveLinksForField(LinkResolver.java:67)
at com.contentful.vault.LinkResolver.resolveLinks(LinkResolver.java:55)
at com.contentful.vault.QueryResolver.resolveLinks(QueryResolver.java:80)
at com.contentful.vault.QueryResolver.all(QueryResolver.java:64)
at com.contentful.vault.FetchQuery.resolveAll(FetchQuery.java:30)
at com.contentful.vault.FetchQuery.all(FetchQuery.java:49)
The error is only fixed after I manually clear the app data and run it again.
When I add a new field to a model and then reference it in my Java model as such:
I get an error on the generated block in the "fromCursor" function:
The error is only fixed after I manually clear the app data and run it again.