我有这样的查询:
@Query("select a from Ability a where a.eventLogic = ?1 AND a.abilitySetId = ?2 ORDER BY RAND() LIMIT ?3")
但是我得到一个错误:
Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: LIMIT near line 1, column 117
我如何以编程方式输入限制数?