Przeglądaj źródła

merged branch nicodmf/master (PR #1469)

Commits
-------

bf76bed Correct prefix from nothing to ORM\ for annotations

Discussion
----------

Correct prefix from nothing to ORM\ for annotations

For yml et xml mapping, the commands generate:doctrine:entities and doctrine:generate:entities, don't prefixed the annotations, specially for the listenners methods (prepersist, preupdate...).
Fabien Potencier 14 lat temu
rodzic
commit
d7da15d054

+ 1 - 0
src/Symfony/Bundle/DoctrineBundle/Command/GenerateEntitiesDoctrineCommand.php

@@ -99,6 +99,7 @@ EOT
         $repoGenerator = new EntityRepositoryGenerator();
         foreach ($metadata->getMetadata() as $m) {
             $output->writeln(sprintf('  > generating <comment>%s</comment>', $m->name));
+            $generator->setAnnotationPrefix('ORM\\');
             $generator->generate(array($m), $metadata->getPath());
 
             if ($m->customRepositoryClassName && false !== strpos($m->customRepositoryClassName, $metadata->getNamespace())) {