在where子句之前使用Hibernate IN关键字有什么用

时间:2014-12-05 10:36:28

标签: java sql hibernate jpql

在我的项目中,我发现了以下语法

createQuery("select stuInfo from StudentInfo stuInfo, IN(stuInfo.studentList) studentList "
    + "where stuInfo.completed =:completed and studentList.Date is null");

我尝试在Google上使用 IN 关键字在where子句之前使用了什么,但我没有找到任何关于此概念的解释。

1 个答案:

答案 0 :(得分:1)

我已经检查过,它只是INNER JOIN的简写,在你的情况下

select stuInfo from StudentInfo stuInfo inner join stuInfo.studentList studentList ...

实际上使用别名student更有意义,而不是studentList,因为这是你所指的。