GORM createCriteria and list do not return the same results : what can I do?

前端 未结 6 1589
名媛妹妹
名媛妹妹 2020-12-16 23:51

I am using Nimble and Shiro for my security frameworks and I\'ve just come accross a GORM bug. Indeed :

User.createCriteria().list { 
   maxResults 10 
} 
         


        
6条回答
  •  孤城傲影
    2020-12-17 00:28

    Thanks for sharing your issue and Kok for answering it. I didn't have a chance to rewrite it to HQL. Here is my solution (workaround): http://ondrej-kvasnovsky.blogspot.com/2012/01/grails-listdistinct-and-pagination.html

    Please tell me if that is useful (at least for someone).

提交回复
热议问题