Grails Sorting By Association in Criteria - Clearly Innovative | Web and Mobile DevelopmentClearly Innovative | Web and Mobile Development

old post migrated from old blog

This is an answer to a question on stack over flow. Grails criteria is sometimes trick when trying to use associations the class files

sorting by a value in the association the trick is to create an alias of the Action object “actionParent” then you get access to the properties which can be used in the criteria. I recommended this approach since the user wants to use a more complex criteria enclosure; that code was excluded in order to keep the example simple

http://stackoverflow.com/questions/3383231/grails-sort-by-the-domain-relation…