我有一个使用 hibernate 和 JPA 的 Maven Web 项目。执行API时出现以下错误
org.hibernate.internal.ExceptionMapperStandardImpl.mapManagedFlushFailure : 39
HHH000346: Error during managed flush [Batch update returned unexpected row count from update [0];
actual row count: 0; expected: 1]
系统一次执行多个 API,但无法确定此错误的用例。 我尝试分别执行多个 API 来复制错误,但没有发生此错误。甚至堆栈跟踪也没有被打印。
最佳答案
在删除根本不存在的 Id 记录时,我遇到了同样的异常。因此,请检查您正在更新/删除的记录是否确实存在于数据库中
关于java - hibernate 错误:- Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58338278/