I am using ormlite in my recent android project. I want to order by on a query on multiple columns in a table (say two columns). How can I achieve that??
Here is the code for a single order by...
QueryBuilder<Visit, Integer> qb = getHelper().getVisitDao().queryBuilder();
qb.where().eq("FOREIGN_ID", id);
qb.orderBy("VISIT_DATE", false);
All you need to do is to call
orderBy(...)
multiple times.This is covered by the documentation. To quote:
Also the javadocs: