Is there a way to get a list ordered by two fields, say last and first names?
I know .listOrderByLastAndFirst and .list(sort:\'last, first\')
.listOrderByLastAndFirst
.list(sort:\'last, first\')
More complicated ordering criteria, (tested in Grails 2.1.0)
def c = MyDomain.withCriteria { property { order('last', 'desc') } order('first', 'desc') }
sorts first by MyDomain.property.last then by MyDomain.first