Skip to content

Commit

Permalink
DDC-502, DDC-507 - Changes to how Annotation Metadata Driver is handl…
Browse files Browse the repository at this point in the history
…ed in SchemaTool Command, Specifiying Mapping paths is now required for this to work.
  • Loading branch information
beberlei committed Apr 10, 2010
1 parent 5d329d7 commit b2fe382
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -27,7 +27,8 @@
Symfony\Components\Console\Output\OutputInterface,
Symfony\Components\Console\Command\Command,
Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper,
Doctrine\ORM\Tools\SchemaTool;
Doctrine\ORM\Tools\SchemaTool,
Doctrine\ORM\Mapping\Driver\AbstractFileDriver;

abstract class AbstractCommand extends Command
{
Expand All @@ -51,7 +52,11 @@ protected function execute(InputInterface $input, OutputInterface $output)

$reader = new \Doctrine\ORM\Tools\ClassMetadataReader();
$reader->setEntityManager($em);
$reader->addMappingSource($em->getConfiguration()->getMetadataDriverImpl());

$metadataDriver = $em->getConfiguration()->getMetadataDriverImpl();
if ($metadataDriver instanceof AbstractFileDriver) {
$reader->addMappingSource($metadataDriver);
}

// Process source directories
if ($emHelper->hasAdditionalMappingPathInformation()) {
Expand Down

0 comments on commit b2fe382

Please sign in to comment.