[DDC-3076] Fix ObjectHydrator
This commit is contained in:
parent
a054b59550
commit
df020e08a0
1 changed files with 7 additions and 1 deletions
|
@ -266,7 +266,13 @@ class ObjectHydrator extends AbstractHydrator
|
||||||
throw HydrationException::emptyDiscriminatorValue($dqlAlias);
|
throw HydrationException::emptyDiscriminatorValue($dqlAlias);
|
||||||
}
|
}
|
||||||
|
|
||||||
$className = $this->ce[$className]->discriminatorMap[$data[$discrColumn]];
|
$discrMap = $this->ce[$className]->discriminatorMap;
|
||||||
|
|
||||||
|
if ( ! isset($discrMap[$data[$discrColumn]])) {
|
||||||
|
throw HydrationException::invalidDiscriminatorValue($data[$discrColumn], array_keys($discrMap));
|
||||||
|
}
|
||||||
|
|
||||||
|
$className = $discrMap[$data[$discrColumn]];
|
||||||
|
|
||||||
unset($data[$discrColumn]);
|
unset($data[$discrColumn]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue