【发布时间】:2015-10-20 09:41:02
【问题描述】:
我的查询是这样的
@Query("select cnt from Content cnt order by
CASE WHEN cnt.status = 'rejected' THEN '1'
WHEN cnt.status = 'modified' ELSE cnt.status END ASC")
如何添加限制 0,100 行来添加我的query?
我写了以下格式,但所有行都是从database获取的
@Query("select cnt from Content cnt
order by CASE WHEN cnt.status = 'rejected' THEN '1'
WHEN cnt.status = 'modified' ELSE cnt.status END ASC limit 0,100")
【问题讨论】:
标签: java mysql hibernate jpa spring-data-jpa