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 = { ...
In this blog I want to share how to use table per sub-class instead of table per hierarchy, which is the default mechanism provided by Grails. I am not sure why Grails chose to use "table-per-hierarchy'. I always find it difficult to understand the table structure produced by "table-per-hierarchy". Moreover, it makes things difficult for...