[DoctrineBundle] fixed the overridding of an Entity
This commit is contained in:
parent
dad75524fc
commit
fff133414d
@ -201,7 +201,7 @@ class DoctrineExtension extends LoaderExtension
|
||||
$bundleEntityMappings = array();
|
||||
$bundleDirs = $this->bundleDirs;
|
||||
$aliasMap = array();
|
||||
foreach ($this->bundles as $className)
|
||||
foreach (array_reverse($this->bundles) as $className)
|
||||
{
|
||||
$tmp = dirname(str_replace('\\', '/', $className));
|
||||
$namespace = str_replace('/', '\\', dirname($tmp));
|
||||
@ -209,6 +209,9 @@ class DoctrineExtension extends LoaderExtension
|
||||
|
||||
if (isset($bundleDirs[$namespace]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$type = false;
|
||||
if (is_dir($dir = $bundleDirs[$namespace].'/'.$class.'/Resources/config/doctrine/metadata'))
|
||||
{
|
||||
@ -231,7 +234,6 @@ class DoctrineExtension extends LoaderExtension
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
$ormConfigDef->addMethodCall('setEntityNamespaces', array($aliasMap));
|
||||
|
||||
$configuration->setDefinition('doctrine.orm.metadata_driver', $mappingDriverDef);
|
||||
|
Reference in New Issue
Block a user