Christ Christ - 3 months ago 19
Android Question

Ormlite unknown ROWID

I have to find the physical location of a row by ROWID using


But when I tried to sort rows using ROWID it throws the exception.

java.lang.IllegalArgumentException: Unknown column name 'rowid' in table Deals

Code follows,

mDealsDao.queryBuilder().orderBy("rowid", true).query();

How can I overcome this worry ? Does any one have faced the Issue Prior... ?


Unknown column name 'rowid' in table Deals

In the future, you should show the entity in question. I suspect that your entity does not have rowid field. Rather, I guess that rowid is an internal database feature. If this is the case, you can deal with rowid in a raw sense but if you try to use it as a field, ORMLite is going to complain.

So you could use:

And other raw methods.