1
0
mirror of synced 2025-03-28 10:53:49 +03:00

fixed indentation

Restored old way of injection to just inject it during a refresh
Added injection for initialized proxies
This commit is contained in:
Stefan Kleff 2013-01-10 15:19:44 +01:00
parent 151192ae37
commit dc925cc9c5

View File

@ -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;