Limit the number of exits in a Hibernate request

I have a sleeping request in grails

 Book.findAllByRating(4)

In the above query, I want only 5 output numbers. How to limit pin 5?

+3
source share
1 answer

The GORM documentation contains some examples of this. You tried:

Book.findAllByRating(4, [max:5])
+8
source

Source: https://habr.com/ru/post/1702799/


All Articles