How do you do a limit query in JPQL or HQL?
This was posted on the Hibernate forum a few years back when asked about why this worked in Hibernate 2 but not in Hibernate 3: Limit was never a supported clause in HQL. You are meant to use setMaxResults(). So if it worked in Hibernate 2, it seems that was by coincidence, rather than by … Read more