Grails 1.1 Hibernate查询语言(HQL) - 分页和排序

使用HQL查询的时候你也可以进行分页和排序。要做的只是简单指定分页和排序参数作为一个散列在方法的末尾调用:def results = Book.findAll("from Book as b where b.title like 'Lord of the%' order by b.title asc",[max:10, offset:20])