JpaRepository Not supported for DML operations [delete query]

前端 未结 4 410
南笙
南笙 2020-12-13 05:39

I have written a query to delete some objects in my interface extending JPaRepository, but when I execute the query it throws an exception! Can anyone explain

4条回答
  •  时光取名叫无心
    2020-12-13 06:13

    I solved the issue by using EntityManager.createQuery("your deleteStatement").executeUpdate();

    I Understand the question is already answered but still posting it, might be useful to other in need of solution.

提交回复
热议问题