OPENJPA-574 DataCache entries not evicted when multiple OptimisticLockExceptions reported from backend DB.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@654631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2008-05-08 21:31:31 +00:00
parent 3f9dcdbb76
commit b585833c0c

View File

@ -241,9 +241,9 @@ public class BatchingPreparedStatementManagerImpl extends
break;
case 0: // no row is inserted, treats it as failed
// case
if (failed != null || row.getAction() == Row.ACTION_UPDATE)
if (failed != null)
_exceptions.add(new OptimisticException(failed));
else
else if (row.getAction() == Row.ACTION_INSERT)
throw new SQLException(_loc.get(
"update-failed-no-failed-obj",
String.valueOf(count[i]), _batchedSql).getMessage());