1
0
mirror of synced 2025-01-10 11:07:10 +03:00

Merge pull request #1037 from spiechu/patch-1

I can't look at those semicolons, sorry ;-)
This commit is contained in:
Marco Pivetta 2014-05-27 09:55:42 +02:00
commit 20e47ae52d

View File

@ -1430,7 +1430,7 @@ class UnitOfWork implements PropertyChangedListener
}
switch (true) {
case ($class->isIdentifierNatural());
case ($class->isIdentifierNatural()):
// Check for a version field, if available, to avoid a db lookup.
if ($class->isVersioned) {
return ($class->getFieldValue($entity, $class->versionField))
@ -2323,7 +2323,7 @@ class UnitOfWork implements PropertyChangedListener
$class = $this->em->getClassMetadata(get_class($entity));
switch (true) {
case LockMode::OPTIMISTIC === $lockMode;
case LockMode::OPTIMISTIC === $lockMode:
if ( ! $class->isVersioned) {
throw OptimisticLockException::notVersioned($class->name);
}