diff --git a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php
index e94749069..25ec5aee8 100644
--- a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php
+++ b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php
@@ -107,10 +107,10 @@ class <className> extends <repositoryName>
      *
      * @return string $namespace
      */
-    private function generateEntityRepositoryNamespace($fullClassName)
+    protected function generateEntityRepositoryNamespace($fullClassName)
     {
         $namespace = $this->getClassNamespace($fullClassName);
-        
+
         return $namespace ? 'namespace ' . $namespace . ';' : '';
     }