Reputation: 155
I have to find the physical location of a row by ROWID using Ormlite
.
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... ?
Upvotes: 0
Views: 288
Reputation: 116888
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:
"rowid DESC"
for descending)And other raw methods.
Upvotes: 4