Browse Source

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

Benjamin Eberlei 14 years ago
parent
commit
d8e03ac782
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php

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

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