Java 意外的行计数:实际的0应为1?
我有一个Java应用程序,并创建了一个Repository类来查询我的Oracle数据库 下面我正在使用的持久性查询导致错误 查询: 我得到的错误是:Java 意外的行计数:实际的0应为1?,java,oracle,persistence,entitymanager,Java,Oracle,Persistence,Entitymanager,我有一个Java应用程序,并创建了一个Repository类来查询我的Oracle数据库 下面我正在使用的持久性查询导致错误 查询: 我得到的错误是: Error : Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1javax.persistence.OptimisticLockException: Batch update returned unexpecte
Error : Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1javax.persistence.OptimisticLockException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
是什么导致了这种情况,我该如何解决呢?你能试试吗
query=persistence.entityManager.CreateNativeQuerySelectfromPerson,其中ID=?1
Error : Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1javax.persistence.OptimisticLockException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1