assuming the following example:
I have a User class and a Item class and a user can have many items
1) Is there a combined dynamic method to get all the items for a user and also sort them after a Property? I have a controller action that gets the items for a user and send them to the view, and the view will render them all with < g:each>. But I want to sort them by any property of Item without sorting the array after it is relived from GORM (using sort in controller or view). So basically what I do now is
items = Item.findAllByOwner(userInstance)and then send the [items:items.sort{it.property}] to the view. I want to combine findAllBy with
Item.listOrderByProperty()
2) Assuming that there is such a method as on 1) : I want to use it to escape the overhead of sorting the array after constructing it. Will such a method be more performant instead of making a sort{} on items ?