#5854 - simple workaround to avoid populating SLC cache from DQL queries with multiple nested DQL aliases
This commit is contained in:
parent
d3f6c5ec70
commit
288e3191ce
@ -261,6 +261,14 @@ class DefaultQueryCache implements QueryCache
|
||||
// @TODO - move to cache hydration components
|
||||
foreach ($rsm->relationMap as $alias => $name) {
|
||||
$metadata = $this->em->getClassMetadata($rsm->aliasMap[$rsm->parentAliasMap[$alias]]);
|
||||
$className = $metadata->getName();
|
||||
|
||||
if (! $entity instanceof $className) {
|
||||
// this alias is not the root alias, therefore we skip it. $entity is always the root of the selection here
|
||||
// @TODO should actually cache all aliases
|
||||
continue;
|
||||
}
|
||||
|
||||
$assoc = $metadata->associationMappings[$name];
|
||||
|
||||
if (($assocValue = $metadata->getFieldValue($entity, $name)) === null || $assocValue instanceof Proxy) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user