瀏覽代碼

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