Explorar o código

[DoctrineBundle] Add support to setting the Annotations prefix to @orm: for EntityGeneration beginning with Doctrine ORM 2.0.2-DEV.

Benjamin Eberlei %!s(int64=14) %!d(string=hai) anos
pai
achega
d8e03ac782

+ 3 - 0
src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php

@@ -70,6 +70,9 @@ abstract class DoctrineCommand extends Command
     {
         $entityGenerator = new EntityGenerator();
 
+        if (version_compare(\Doctrine\ORM\Version::VERSION, "2.0.2-DEV") >= 0) {
+            $entityGenerator->setAnnotationPrefix("orm:");
+        }
         $entityGenerator->setGenerateAnnotations(false);
         $entityGenerator->setGenerateStubMethods(true);
         $entityGenerator->setRegenerateEntityIfExists(false);