1
0
mirror of synced 2025-01-29 19:41:45 +03:00

DDC-502, DDC-507 - Changes to how Annotation Metadata Driver is handled in SchemaTool Command, Specifiying Mapping paths is now required for this to work.

This commit is contained in:
Benjamin Eberlei 2010-04-10 12:31:48 +02:00
parent 5d329d7e2c
commit b2fe3820fc

View File

@ -27,7 +27,8 @@ use Symfony\Components\Console\Input\InputArgument,
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
{
@ -51,7 +52,11 @@ abstract class AbstractCommand extends Command
$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()) {