Преглед на файлове

[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);