Resolve association entries on multi get cache
This commit is contained in:
parent
cb52782e5e
commit
8eea7c86f7
@ -89,7 +89,7 @@ class DefaultCollectionHydrator implements CollectionHydrator
|
||||
|
||||
/* @var $entityEntries \Doctrine\ORM\Cache\EntityCacheEntry[] */
|
||||
foreach ($entityEntries as $index => $entityEntry) {
|
||||
$list[$index] = $this->uow->createEntity($entityEntry->class, $entityEntry->data, self::$hints);
|
||||
$list[$index] = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints);
|
||||
}
|
||||
|
||||
array_walk($list, function($entity, $index) use ($collection) {
|
||||
|
@ -2625,10 +2625,6 @@ class UnitOfWork implements PropertyChangedListener
|
||||
|
||||
if ($joinColumnValue !== null) {
|
||||
if ($targetClass->containsForeignIdentifier) {
|
||||
if ($joinColumnValue instanceof AssociationCacheEntry) {
|
||||
$joinColumnValue = implode(' ', $joinColumnValue->identifier);
|
||||
}
|
||||
|
||||
$associatedId[$targetClass->getFieldForColumn($targetColumn)] = $joinColumnValue;
|
||||
} else {
|
||||
$associatedId[$targetClass->fieldNames[$targetColumn]] = $joinColumnValue;
|
||||
|
@ -72,9 +72,7 @@ final class IdentifierFlattener
|
||||
$flatId = array();
|
||||
|
||||
foreach ($class->identifier as $field) {
|
||||
if (isset($class->associationMappings[$field]) && isset($id[$field]) && $id[$field] instanceof \Doctrine\ORM\Cache\AssociationCacheEntry) {
|
||||
$flatId[$field] = implode(' ', $id[$field]->identifier);
|
||||
} elseif (isset($class->associationMappings[$field]) && isset($id[$field]) && is_object($id[$field])) {
|
||||
if (isset($class->associationMappings[$field]) && isset($id[$field]) && is_object($id[$field])) {
|
||||
$targetClassMetadata = $this->metadataFactory->getMetadataFor(
|
||||
$class->associationMappings[$field]['targetEntity']
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user