我使用@Modifying注释和@Query注释来执行SQL DELETE查询,并从数据库表中删除记录。customersId") Long customersId, @Param("userId") Long userId, @Param("sellerId") Long sellerId);
在执行更新/删除查询‘和异常=’执行更新/删除</e
您好,我使用的是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
我正在尝试使用Spring更新表(@ CRUDRepository注释)。但是系统在更新时出现了错误。我搜索并发现了许多线程,通知添加事务性注释。我做了但没有效果。有人能帮我一下吗。org.springframework.dao.InvalidDataAccessApiUsageException: Executing an update/delete query; nested exception is javax.persistence.TransactionRequiredExceptioncom.acm.bap.print