I'm using spring JPA for select operation on MySql Database
Table
select id, grp, name from student;
Repository method
List<Student> findByGrpAndName(String grp, Set<String> name);
And it's throwing
java.sql.SQLException: Operand should contain 1 column(s)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:127)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)
I tried to debug the hibernet code to see the query getting created. And query has syntax error.
select student0_.name as name1_1_, student0_.grp as grp2_1_ from student student0_ where student0_.grp=? and student0_.name=(? , ?);
It should be student0_.name in (? , ?);
Am I missing something to tell JPA it should be an in clause