From 2a2936fde5c025e9a72bf1cd3c623e827ad774bb Mon Sep 17 00:00:00 2001
From: beberlei <kontakt@beberlei.de>
Date: Sat, 28 Aug 2010 14:53:42 +0200
Subject: [PATCH] DDC-771 - Bugfix in EntityGenerator generated use statement

---
 lib/Doctrine/ORM/Tools/EntityGenerator.php | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php
index b32197895..616c60a9d 100644
--- a/lib/Doctrine/ORM/Tools/EntityGenerator.php
+++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php
@@ -312,7 +312,7 @@ public function <methodName>()
     private function _generateEntityUse(ClassMetadataInfo $metadata)
     {
         if ($this->_extendsClass()) {
-            return "\n\nuse " . $this->_getClassToExtendNamespace() . ";\n";
+            return "\n\nuse " . $this->_getClassToExtendName() . ";\n";
         }
     }
 
@@ -382,13 +382,6 @@ public function <methodName>()
         return $refl->getName();
     }
 
-    private function _getClassToExtendNamespace()
-    {
-        $refl = new \ReflectionClass($this->_getClassToExtend());
-
-        return $refl->getNamespaceName() ? $refl->getNamespaceName():$refl->getShortName();        
-    }
-
     private function _getClassName(ClassMetadataInfo $metadata)
     {
         return ($pos = strrpos($metadata->name, '\\'))