diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 6999f85ce..3fdbe171e 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -375,7 +375,7 @@ class BasicEntityPersister $result = $this->_conn->executeUpdate($sql, $params, $types); - if ($this->_class->isVersioned && ! $result) { + if ($versioned && ! $result) { throw OptimisticLockException::lockFailed($entity); } }