0

I found this named query in an application I'm working on:

from UserBookmark as userBookmark where userBookmark.user.id = :userId order by userBookmark.id desc 5

The query is creating this error after upgrading to hibernate 5:

unexpected token: 5

Is there any legitimate reason for a '5' to be in the query or can I safely get rid of that?

Brent Sandstrom
  • 841
  • 10
  • 16

1 Answers1

0

I was googling the wrong thing. I found what I was looking for here

This comment seems to be correct: (Referring to using this syntax to set max results) "Hm... not too sure about this, [citation needed] this may be an accident and could suddenly stop working in a new version of hibernate."

Community
  • 1
  • 1
Brent Sandstrom
  • 841
  • 10
  • 16