我使用@Modifying注释和@Query注释来执行SQL DELETE查询,并从数据库表中删除记录。customersId") Long customersId, @Param("userId") Long userId, @Param("sellerId") Long sellerId);
在执行更新/删除查询‘和异常=’执行更新</
您好,我使用的是spring boot,即使在使用@Transactional之后也会出现上述异常。调用的结构如下: @Service public void methodA() { }class Dao { repo.updateQuery();}
class Repo {@Query("Update table....")
v
但我无法在异常下执行insert操作。线程"Thread-21“javax.persistence.TransactionRequiredException:中的异常(在org.hibernate.ejb.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:96) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native方法处执行更新/删除查询)在sun.re