Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix RepositoryGenerator

  • Loading branch information...
commit 4df2055b63eab05fcd2b010817ede4c59dd02f98 1 parent b911b63
Igor Golovanov authored July 19, 2011
4  Command/DoctrineOXMCommand.php
@@ -58,9 +58,7 @@ protected function getBundleMetadatas(Bundle $bundle)
58 58
         $bundleMetadatas = array();
59 59
         $xmlEntityManagers = $this->getDoctrineXmlEntityManagers();
60 60
         foreach ($xmlEntityManagers as $key => $xem) {
61  
-            $cmf = new DisconnectedClassMetadataFactory();
62  
-            $cmf->setXmlEntityManager($xem);
63  
-            $cmf->setConfiguration($xem->getConfiguration());
  61
+            $cmf = new DisconnectedClassMetadataFactory($xem->getConfiguration(), $xem->getEventManager());
64 62
             $metadatas = $cmf->getAllMetadata();
65 63
             foreach ($metadatas as $metadata) {
66 64
                 if (strpos($metadata->name, $namespace) === 0) {
4  Command/GenerateRepositoriesDoctrineOXMCommand.php
@@ -22,7 +22,7 @@ protected function configure()
22 22
             ->setName('doctrine:oxm:generate:repositories')
23 23
             ->setDescription('Generate repository classes from your mapping information.')
24 24
             ->addArgument('bundle', InputArgument::REQUIRED, 'The bundle to initialize the repositories in.')
25  
-            ->addOption('xm-entity', null, InputOption::VALUE_OPTIONAL, 'The xml-entity class to generate the repository for (shortname without namespace).')
  25
+            ->addOption('xml-entity', null, InputOption::VALUE_OPTIONAL, 'The xml-entity class to generate the repository for (shortname without namespace).')
26 26
             ->setHelp(<<<EOT
27 27
 The <info>doctrine:oxm:generate:repositories</info> command generates the configured dxml-entity repository classes from your mapping information:
28 28
 
@@ -43,7 +43,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
43 43
             $generator = new XmlEntityRepositoryGenerator();
44 44
 
45 45
             foreach ($metadatas as $metadata) {
46  
-                if ($filterDocument && $filterXmlEntity !== $metadata->reflClass->getShortname()) {
  46
+                if ($filterXmlEntity && $filterXmlEntity !== $metadata->reflClass->getShortname()) {
47 47
                     continue;
48 48
                 }
49 49
 

0 notes on commit 4df2055

Please sign in to comment.
Something went wrong with that request. Please try again.