Simplify condition of previous commit (5cdc73e
)
This commit is contained in:
parent
760aaa67c4
commit
6505c96ec4
@ -1851,7 +1851,7 @@ class UnitOfWork implements PropertyChangedListener
|
|||||||
// do not merge fields marked lazy that have not been fetched.
|
// do not merge fields marked lazy that have not been fetched.
|
||||||
continue;
|
continue;
|
||||||
} else if ( ! $assoc2['isCascadeMerge']) {
|
} else if ( ! $assoc2['isCascadeMerge']) {
|
||||||
if (($otherState = $this->getEntityState($other)) !== self::STATE_MANAGED && $otherState !== self::STATE_NEW) {
|
if ($this->getEntityState($other) === self::STATE_DETACHED) {
|
||||||
$targetClass = $this->em->getClassMetadata($assoc2['targetEntity']);
|
$targetClass = $this->em->getClassMetadata($assoc2['targetEntity']);
|
||||||
$relatedId = $targetClass->getIdentifierValues($other);
|
$relatedId = $targetClass->getIdentifierValues($other);
|
||||||
|
|
||||||
@ -1862,6 +1862,7 @@ class UnitOfWork implements PropertyChangedListener
|
|||||||
$this->registerManaged($other, $relatedId, array());
|
$this->registerManaged($other, $relatedId, array());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$prop->setValue($managedCopy, $other);
|
$prop->setValue($managedCopy, $other);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user