瀏覽代碼

Merge remote branch 'thesalla/generate_repos_fix'

Fabien Potencier 14 年之前
父節點
當前提交
46fc044d32

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Command/GenerateRepositoriesDoctrineCommand.php

@@ -58,7 +58,7 @@ EOT
                 }
 
                 if ($metadata->customRepositoryClassName) {
-                    if (strpos($metadata->customRepositoryClassName, $foundBundle->getName()) === false) {
+                    if (strpos($metadata->customRepositoryClassName, $foundBundle->getNamespace()) === false) {
                         throw new \RuntimeException(
                             "Repository " . $metadata->customRepositoryClassName . " and bundle don't have a common namespace, ".
                             "generation failed because the target directory cannot be detected.");

+ 1 - 1
src/Symfony/Bundle/DoctrineMongoDBBundle/Command/GenerateRepositoriesDoctrineODMCommand.php

@@ -58,7 +58,7 @@ EOT
                 }
 
                 if ($metadata->customRepositoryClassName) {
-                    if (strpos($metadata->customRepositoryClassName, $foundBundle->getName()) === false) {
+                    if (strpos($metadata->customRepositoryClassName, $foundBundle->getNamespace()) === false) {
                         throw new \RuntimeException(
                             "Repository " . $metadata->customRepositoryClassName . " and bundle don't have a common namespace, ".
                             "generation failed because the target directory cannot be detected.");