Преглед изворни кода

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

Benjamin Eberlei пре 14 година
родитељ
комит
d8e03ac782
1 измењених фајлова са 3 додато и 0 уклоњено
  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();
 
+        if (version_compare(\Doctrine\ORM\Version::VERSION, "2.0.2-DEV") >= 0) {
+            $entityGenerator->setAnnotationPrefix("orm:");
+        }
         $entityGenerator->setGenerateAnnotations(false);
         $entityGenerator->setGenerateStubMethods(true);
         $entityGenerator->setRegenerateEntityIfExists(false);