column和column =:变量在HQL中不起作用

时间:2016-08-08 20:58:03

标签: java hibernate

  

SELECT fr1 FROM Friend fr1 where fr1.userIdOne AND fr1.userIdTwo IN (:list) why operator 'AND' does not work for this in hql?

给我this错误。有人会对此有所了解吗?谢谢!

1 个答案:

答案 0 :(得分:0)

您必须在逻辑语句之间使用AND关键字。您的查询应如下所示: SELECT fr1 FROM Friend fr1 where fr1.userIdOne IN (:list) AND fr1.userIdTwo IN (:list)