1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Only refresh the given entity if an entity is specified in the query hints

This commit is contained in:
Alexander 2011-11-09 22:13:06 +01:00
parent 3131103801
commit 9c9f85ed4b

View File

@ -2195,6 +2195,11 @@ class UnitOfWork implements PropertyChangedListener
}
} else {
$overrideLocalValues = isset($hints[Query::HINT_REFRESH]);
// If a only a specific entity is set to refresh, check that it's the one
if(isset($hints[Query::HINT_REFRESH_ENTITY])) {
$overrideLocalValues = $hints[Query::HINT_REFRESH_ENTITY] === $entity;
}
}
if ($overrideLocalValues) {