我正在使用Spring JPA在MySql数据库上进行选择操作
桌子
select id, grp, name from student;
储存库方法
List<Student> findByGrpAndName(String grp, Set<String> name);
它在扔
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)
我试图调试hibernet代码以查看正在创建的查询。并且查询有语法错误。
select student0_.name as name1_1_, student0_.grp as grp2_1_ from student student0_ where student0_.grp=? and student0_.name=(? , ?);
它应该是 student0_.name in (? , ?);
我是否想告诉JPA它应该是一个 in clause
相关分类