I want to integrate sort, order, max and offset in a findAll query. The following works fine:

def books = Book.findAll("from Book as b where b.approved=true order by b.dateCreated  desc", [max: max, offset: offset])

But what I want is:

def books = Book.findAll("from Book as b where b.approved=true", [sort: 'dateCreated', order: 'desc', max: max, offset: offset])

This does not work. How do I have to rewrite this?

Edit
Report