Is it possible to sort by nested attributes using queries?
I have 2 domain classes:
class Parent { String name Child child }
and
class Child { String name static belongsTo = [parent: Parent] }
It works:
Parent.where {}.list(sort: 'name')
and this is not so:
Parent.where {}.list(sort: 'child.name')
I have an error:
could not resolve property: child.name of: Parent
I am using grails 2.3.x
source share