Store column values of not cache-able associations
This commit is contained in:
parent
ed6fa0deb4
commit
58e20c70c6
1 changed files with 7 additions and 0 deletions
|
@ -73,8 +73,15 @@ class DefaultEntityHydrator implements EntityHydrator
|
|||
}
|
||||
|
||||
if ( ! isset($assoc['cache']) || ! ($assoc['type'] & ClassMetadata::TO_ONE)) {
|
||||
$associatedEntity = $data[$name];
|
||||
unset($data[$name]);
|
||||
|
||||
if ($this->uow->isInIdentityMap($associatedEntity)) {
|
||||
$targetEntityMetadata = $this->em->getClassMetadata($assoc['targetEntity']);
|
||||
foreach ($this->uow->getEntityIdentifier($associatedEntity) as $fieldName => $fieldValue) {
|
||||
$data[$assoc['targetToSourceKeyColumns'][$targetEntityMetadata->getColumnName($fieldName)]] = $fieldValue;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue