Reputation: 275
is it possible to use the Grails "g:sortableColumn" tag to sort by a domain class "hasMany" property count?
class Book { hasMany = [authors: User]}
I want to sort all Books by the number of authors with a "g:sortableColumn" tag in my view, but how? Realy not possible?
Thanks and best regards...
Upvotes: 3
Views: 820
Reputation: 33335
not the best solution, but one
I thought there was a way to do it with criteriaBuilder but I cannot seem to make it work without changing your domain object
Upvotes: 1