Merge pull request #1037 from spiechu/patch-1
I can't look at those semicolons, sorry ;-)
This commit is contained in:
commit
20e47ae52d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user