Applying pagination options to a one-to-many list in Grails

Posted by UltraVi01 on Stack Overflow See other posts from Stack Overflow or by UltraVi01
Published on 2010-04-10T03:19:26Z Indexed on 2010/04/10 3:23 UTC
Read the original article Hit count: 340

Filed under:
|

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 ?

© Stack Overflow or respective owner

Related posts about grails

Related posts about groovy