Permalink
Browse files

Fix RepositoryGenerator

  • Loading branch information...
1 parent b911b63 commit 4df2055b63eab05fcd2b010817ede4c59dd02f98 @igorgolovanov committed Jul 19, 2011
Showing with 3 additions and 5 deletions.
  1. +1 −3 Command/DoctrineOXMCommand.php
  2. +2 −2 Command/GenerateRepositoriesDoctrineOXMCommand.php
@@ -58,9 +58,7 @@ protected function getBundleMetadatas(Bundle $bundle)
$bundleMetadatas = array();
$xmlEntityManagers = $this->getDoctrineXmlEntityManagers();
foreach ($xmlEntityManagers as $key => $xem) {
- $cmf = new DisconnectedClassMetadataFactory();
- $cmf->setXmlEntityManager($xem);
- $cmf->setConfiguration($xem->getConfiguration());
+ $cmf = new DisconnectedClassMetadataFactory($xem->getConfiguration(), $xem->getEventManager());
$metadatas = $cmf->getAllMetadata();
foreach ($metadatas as $metadata) {
if (strpos($metadata->name, $namespace) === 0) {
@@ -22,7 +22,7 @@ protected function configure()
->setName('doctrine:oxm:generate:repositories')
->setDescription('Generate repository classes from your mapping information.')
->addArgument('bundle', InputArgument::REQUIRED, 'The bundle to initialize the repositories in.')
- ->addOption('xm-entity', null, InputOption::VALUE_OPTIONAL, 'The xml-entity class to generate the repository for (shortname without namespace).')
+ ->addOption('xml-entity', null, InputOption::VALUE_OPTIONAL, 'The xml-entity class to generate the repository for (shortname without namespace).')
->setHelp(<<<EOT
The <info>doctrine:oxm:generate:repositories</info> command generates the configured dxml-entity repository classes from your mapping information:
@@ -43,7 +43,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$generator = new XmlEntityRepositoryGenerator();
foreach ($metadatas as $metadata) {
- if ($filterDocument && $filterXmlEntity !== $metadata->reflClass->getShortname()) {
+ if ($filterXmlEntity && $filterXmlEntity !== $metadata->reflClass->getShortname()) {
continue;
}

0 comments on commit 4df2055

Please sign in to comment.