From 935594578a4c06b4593fb553b63e5199288639e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szczepan=20Cie=C5=9Blik?= Date: Fri, 25 Jan 2013 13:15:14 +0100 Subject: [PATCH] [DDC-2256] Code refactorization. --- lib/Doctrine/ORM/Query/ResultSetMapping.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/Doctrine/ORM/Query/ResultSetMapping.php b/lib/Doctrine/ORM/Query/ResultSetMapping.php index 6e620180a..fb9215383 100644 --- a/lib/Doctrine/ORM/Query/ResultSetMapping.php +++ b/lib/Doctrine/ORM/Query/ResultSetMapping.php @@ -559,15 +559,10 @@ class ResultSetMapping $translate = function (&$alias) use ($em, $fqcn) { - if (strpos($alias, ':') !== false && !isset($fqcn[$alias])) { - if ($metadata = $em->getClassMetadata($alias)) { - $fqcn[$alias] = $metadata->name; - } - } - - if (isset($fqcn[$alias])) { - $alias = $fqcn[$alias]; + if ( ! isset($fqcn[$alias])) { + $fqcn[$alias] = $em->getClassMetadata($alias)->getName(); } + $alias = $fqcn[$alias]; }; array_walk($this->aliasMap, $translate);