Applying pagination options to a one-to-many list in Grails
- by UltraVi01
I have a User class that hasMany = [friends:User]
Now I am trying to display the friends list - ${user.friends}
However, I'd like to be able to apply parameters like I can with, for example, User.findAllBy(user, [max:10, sort: 'dateCreated', order: 'desc"])
Can someone kindly tell me how to do this on a one-to-many in Grails / Groovy ?