Amit
Amit

Reputation: 495

What is the use of Hbernate IN keyword before where clause

Some where in my project I found the below Syntax

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

I tried to Google it what is the use of IN keyword before where clause, But I didn't find any explanation regard this concept.

Upvotes: 0

Views: 54

Answers (1)

Marko Topolnik
Marko Topolnik

Reputation: 200236

I've checked it, it's just a shorthand for an INNER JOIN, in your case

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

where actually it's more meaningful to use the alias student, not studentList, because that's what you refer to by it.

Upvotes: 1

Related Questions