I have query as such :
@Query("select a from Ability a where a.eventLogic = ?1 AND a.abilitySetId = ?2 ORDER BY RAND() LIMIT ?3")
BUt i get an error:
Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: LIMIT near line 1, column 117
How can i programmatically put in the limit number?