【发布时间】:2021-01-24 18:58:20
【问题描述】:
我有一个这样的 JPQL 查询:
@Modifying
@Query("delete from Thing t where t.manyToOne1.manyToOne2 = :farThing and t.id in :ids")
void delete(ManyToOne2 manyToOne2, List<String> ids);
导致异常:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cross join many_to_one1 manytoone1_ where manytoone2_id=1039 and (id in (' at line 1
【问题讨论】:
标签: java spring-boot hibernate spring-data-jpa jpql