diff --git a/src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php b/src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php index 4c4c9ac084..b01ccdcef1 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php +++ b/src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php @@ -93,7 +93,8 @@ EOT $databaseDriver = new DatabaseDriver($em->getConnection()->getSchemaManager()); $em->getConfiguration()->setMetadataDriverImpl($databaseDriver); - $cmf = new DisconnectedClassMetadataFactory($em); + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); $metadata = $cmf->getAllMetadata(); if ($metadata) { $output->writeln(sprintf('Importing mapping information from "%s" entity manager', $emName));