在我的项目中的某些地方我发现了以下语法
createQuery("select stuInfo from StudentInfo stuInfo, IN(stuInfo.studentList) studentList "
+ "where stuInfo.completed =:completed and studentList.Date is null");
我尝试用Google搜索where子句之前的IN关键字有什么用,但我没有找到任何关于这个概念的解释。
最佳答案
我已经检查过,在您的情况下,它只是 INNER JOIN 的简写
select stuInfo from StudentInfo stuInfo inner join stuInfo.studentList studentList ...
实际上,使用别名 student
更有意义,而不是 studentList
,因为这就是您所引用的内容。
关于java - Hibernate IN关键字在where子句之前有什么用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27313949/