From d8e03ac782f310aa33962faa6f49d11c64060cd2 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Wed, 2 Feb 2011 23:54:50 +0100 Subject: [PATCH] [DoctrineBundle] Add support to setting the Annotations prefix to @orm: for EntityGeneration beginning with Doctrine ORM 2.0.2-DEV. --- src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php b/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php index c058d2c7ba..0f2ac56e9f 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php +++ b/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);