Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Modify the method to get all the metadaclasses to use the filter paramet... #161

wants to merge 3 commits into from

2 participants



I needed to import the mapping of an existing database in order to create doctrine2 entities, but when you run the command, it throw an exception on every table without a primary key.

I tried to use the filter option, but the error still occurs because the exception was throw in the method which get all the metadata informations.

I added a method which get the metadata of some tables according to a filter.

This is linked with a request on doctrine2 : doctrine/doctrine2#603

What are your thought bout my issue?


This would force us to bump the Doctrine requirement.

and keeping old code in comments is useless. Keeping the history is done by git in a much more efficient and usable way.


Closing as the ORM pull request has been rejected

@stof stof closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2013
  1. Code style modification after @stof comments

    nicolasTheodo authored
Commits on Mar 13, 2013
  1. Suppress a line

    Nicolas Thal authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  Command/ImportMappingDoctrineCommand.php
3  Command/ImportMappingDoctrineCommand.php
@@ -105,8 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$cmf = new DisconnectedClassMetadataFactory();
- $metadata = $cmf->getAllMetadata();
- $metadata = MetadataFilter::filter($metadata, $input->getOption('filter'));
+ $metadata = $cmf->getAllFilteredMetadata($input->getOption('filter'));
if ($metadata) {
$output->writeln(sprintf('Importing mapping information from "<info>%s</info>" entity manager', $emName));
foreach ($metadata as $class) {
Something went wrong with that request. Please try again.