fixed indentation
Restored old way of injection to just inject it during a refresh Added injection for initialized proxies
This commit is contained in:
parent
151192ae37
commit
dc925cc9c5
@ -2478,6 +2478,11 @@ class UnitOfWork implements PropertyChangedListener
|
||||
$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]);
|
||||
|
||||
@ -2485,12 +2490,12 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
// inject ObjectManager into just loaded proxies.
|
||||
if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
|
||||
$entity->injectObjectManager($this->em, $class);
|
||||
}
|
||||
|
||||
if ($overrideLocalValues) {
|
||||
$this->originalEntityData[$oid] = $data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user