ActiveAndroid
ActiveAndroid copied to clipboard
Strange problem when querying
I met a strange problem when I query:
List<A> list = new Select().from(A.class).orderBy("date desc").execute();
Error is:
Failed to read row 0, column 0 from a CursorWindow which has 0 rows, 5 columns.
when I debug the code, I found:
java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
the sql is:
create table PhotoList(Id integer PRIMARY KEY AUTOINCREMENT, title text, date integer, content text, image blob)
and pojo is like :
@Table(name = "PhotoList", id="Id")
public class A extends Model{
@Column(name = "title")
private String title;
@Column(name = "date")
private long date;
@Column(name = "content")
private String content;
@Column(name = "image")
private byte[] imageContent;
}
can you help me solve that or do I need to show more information?
@hsmyy Iam having the same issue so far no solution found.you found the solution ?