JPA不支持delete的问题解决--- JPA Not supported for DML operations

在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")

 

上一篇:Content type ‘application/x-www-form-urlencoded;charset=UTF-8‘ not supported


下一篇:Win7无法安装Nodejs提示:This application is only supported on Window 8.1, windows server 2012, or higher.