I want to sort a collection in grails by date when I do the following:
def pics = Picture.findAllByChild(child, [sort: 'dateCreated', order: 'desc']) pics.add(Post.findAllByPostedToAll(true))
Because I added more items to the list, I need to sort by date again Created in descending order It does not look like the sort class can do this. I tried:
pics.sort(it.dateCreated)
But it is not allowed
source share