Recently, in my project I had to implement search functionality. I used grails createCriteria to implement it.Now I needed to apply the sorting on the result returned. My domain was something like this : class MyEntity { OrganizationName orgName PersonName personName static constraints = { ...