diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php index 89a6a55d5..c350ca045 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php @@ -25,7 +25,9 @@ use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, Symfony\Components\Console, Doctrine\ORM\Tools\Console\MetadataFilter, - Doctrine\ORM\Tools\Export\ClassMetadataExporter; + Doctrine\ORM\Tools\Export\ClassMetadataExporter, + Doctrine\ORM\Tools\EntityGenerator, + Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; /** * Command to convert your mapping information between the various formats. @@ -94,7 +96,8 @@ EOT ); } - $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $cmf = new DisconnectedClassMetadataFactory($em); + $metadatas = $cmf->getAllMetadata(); $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); // Process destination directory