【发布时间】:2012-01-22 13:02:14
【问题描述】:
我想知道是否有一种方法可以编写类似于下面的 JPQL 语句
select o from entity1 o where (o.field1, o.field2) IN (select value1, value2 from ...)
类似的 sql 查询在 Oracle 10g 中工作。但是,在eclipselink中,我得到了这个错误:
syntax error at [,].
Internal Exception: MismatchedTokenException(81!=84)
at org.eclipse.persistence.exceptions.JPQLException.syntaxErrorAt(JPQLException.java:362)
at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.handleRecognitionException(JPQLParser.java:301)
at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.addError(JPQLParser.java:242)
at org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.reportError(JPQLParser.java:359)
感谢任何帮助。
谢谢, 吉隆坡
【问题讨论】:
标签: jpa eclipselink jpql