Commit b2fe3820 authored by Benjamin Eberlei's avatar Benjamin Eberlei

DDC-502, DDC-507 - Changes to how Annotation Metadata Driver is handled in...

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.
parent 5d329d7e
......@@ -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()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment