为了账号安全,请及时绑定邮箱和手机立即绑定

Spring JPA in子句引发操作数应包含1列

Spring JPA in子句引发操作数应包含1列

长风秋雁 2021-05-14 09:14:46
我正在使用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
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 215 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号