Merge pull request #1026 from flack/patch-5
Remove some redundant clauses
This commit is contained in:
commit
94837a0105
@ -2553,12 +2553,6 @@ class UnitOfWork implements PropertyChangedListener
|
||||
if ($entity instanceof NotifyPropertyChanged) {
|
||||
$entity->addPropertyChangedListener($this);
|
||||
}
|
||||
|
||||
// inject ObjectManager into just loaded proxies.
|
||||
if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
|
||||
$entity->injectObjectManager($this->em, $class);
|
||||
}
|
||||
|
||||
} else {
|
||||
$overrideLocalValues = isset($hints[Query::HINT_REFRESH]);
|
||||
|
||||
@ -2566,14 +2560,14 @@ class UnitOfWork implements PropertyChangedListener
|
||||
if (isset($hints[Query::HINT_REFRESH_ENTITY])) {
|
||||
$overrideLocalValues = $hints[Query::HINT_REFRESH_ENTITY] === $entity;
|
||||
}
|
||||
|
||||
// inject ObjectManager upon refresh.
|
||||
if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
|
||||
$entity->injectObjectManager($this->em, $class);
|
||||
}
|
||||
}
|
||||
|
||||
if ($overrideLocalValues) {
|
||||
// inject ObjectManager upon refresh.
|
||||
if ($entity instanceof ObjectManagerAware) {
|
||||
$entity->injectObjectManager($this->em, $class);
|
||||
}
|
||||
|
||||
$this->originalEntityData[$oid] = $data;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user