【发布时间】:2014-06-18 09:49:43
【问题描述】:
考虑以下正确的查询
select _.* from _misc._lang__ _ where _.id > 10 order by _.id asc limit 1 offset 0
现在我尝试像这样进行 JPQL 查询
select l from _misc._lang__ l where l.id > :arg order by l.id asc limit 1 offset 0
还有错误(EclipseLink)
The ORDER BY clause has 'l.id ASC ' and 'limit ' that are not separated by a comma.
似乎 eclipse 链接将limit 作为列名而不是关键字,现在我该如何修复它?
谢谢!
【问题讨论】:
-
我建议你学习 JPQL 的语法:它使用类名而不是表名,它不使用 .*,它没有限制和偏移子句。简而言之,它是一种与 SQL 不同的语言,你必须学习它。
-
@JBNizet 对不起,错字:D
标签: postgresql jpa jpql