Reputation: 563
In eabean how to sort by multiple column.
Ex: .orderBy().asc(field1).orderBy().asc(field2)
I am trying this but it only considering field2 for sorting.
Upvotes: 0
Views: 165
Reputation: 411
Ebean.find(YourBean.class)
.where()
.eq("name", "test")
.orderBy().desc("name, id")
.findList();
That's all you need to do separate the properties with commas.
Upvotes: 1