0

Im tried to use the LIMIT key word in my @Query annotated query but it doesn't seem to work as its not supported.

Is there any change to deliver only one record from a SELECT query?

I ve seen it would work with Hibernate CriteriaBuilder or Query objectsif used as they give the possibility to set a max size or limit but haven't seen any solution yet which would work with the @Query annotation.

Jens Schauder
  • 77,657
  • 34
  • 181
  • 348
StephanM
  • 1,350
  • 2
  • 24
  • 50
  • 1
    Maybe this helps http://stackoverflow.com/questions/9314078/setmaxresults-for-spring-data-jpa-annotation – RubioRic May 05 '17 at 11:50
  • Thanks guys. Deciced to go the route with Pageble as i want to implement also a REST api later. Thx! – StephanM May 05 '17 at 15:53

0 Answers0