diff --git a/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php index ad8c0840c..302cc6b54 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php @@ -194,6 +194,7 @@ abstract class AbstractHydrator $cache[$key]['isMetaColumn'] = true; $cache[$key]['fieldName'] = $fieldName; $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; + $classMetadata = $this->_em->getClassMetadata($this->_rsm->aliasMap[$cache[$key]['dqlAlias']]); $cache[$key]['isIdentifier'] = $classMetadata->isIdentifier($fieldName); } }