关于Hibernate HQL IN()操作符问题!
各位好,今天用了一下IN()操作符,但是报错,请大家帮忙看一下,我用的是Hibernate 3以上版本。
代码摘要:
String itemsql = "from Item i in(i.bids) b where b.amountCurrency >200 ";
List itemList = secondSession.createQuery(itemsql).list();
错误摘要:
Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: unexpected token: in near line 1, column 28 [select i from hello.Item i in(i.bids) b where b.amountCurrency >200 ]
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31)
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24)
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)