Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 意外的行计数:实际的0应为1?_Java_Oracle_Persistence_Entitymanager - Fatal编程技术网

Java 意外的行计数:实际的0应为1?

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

我有一个Java应用程序,并创建了一个Repository类来查询我的Oracle数据库

下面我正在使用的持久性查询导致错误

查询:

我得到的错误是:

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