1
0
mirror of synced 2025-03-21 07:23:55 +03:00

#1178 - using the PersisterHelper to extract type of associated meta-result columns

This commit is contained in:
Marco Pivetta 2015-01-17 05:39:02 +01:00
parent e5c4e65764
commit 096bd90aed

View File

@ -1316,10 +1316,7 @@ class BasicEntityPersister implements EntityPersister
$resultColumnName = $this->getSQLColumnAlias($joinColumn['name']);
$columnList[] = $this->getSQLTableAlias($class->name, ($alias == 'r' ? '' : $alias) )
. '.' . $quotedColumn . ' AS ' . $resultColumnName;
if (isset($targetClass->fieldNames[$joinColumn['referencedColumnName']])) {
$type = $targetClass->fieldMappings[$targetClass->fieldNames[$joinColumn['referencedColumnName']]]['type'];
}
$type = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
$this->rsm->addMetaResult($alias, $resultColumnName, $quotedColumn, $isIdentifier, $type);
}