每当我在JPA中使用LIMIT时,查询例外是Thrown.can任何人都建议我根据他们的rowNum或ronCount过滤记录。
Select a from EmployeeBo where a.batchId=:'127'and LIMIT :startPonit,:endPoint,
您不能在JPA命名查询中使用LIMIT
,但可以使用setMaxResult();
将记录限制为行数setMaxResult();
您应该使用Query#setFirstResult()和Query#setMaxResults()来实现此目的。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.