在JPA的代码中,如果使用自定义update、delete语句时,例如: @Query("delete from table t where t.id = ?1") 会碰到”Not supported for DML operations [delete “问题,解决方法,加上Modifying注解 @Modifying @Query("delete from CfgComponentColumn c where c.component.id = ?1")
2024-01-31 18:42:46
在JPA的代码中,如果使用自定义update、delete语句时,例如: @Query("delete from table t where t.id = ?1") 会碰到”Not supported for DML operations [delete “问题,解决方法,加上Modifying注解 @Modifying @Query("delete from CfgComponentColumn c where c.component.id = ?1")