[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();
|
$bundleEntityMappings = array();
|
||||||
$bundleDirs = $this->bundleDirs;
|
$bundleDirs = $this->bundleDirs;
|
||||||
$aliasMap = array();
|
$aliasMap = array();
|
||||||
foreach ($this->bundles as $className)
|
foreach (array_reverse($this->bundles) as $className)
|
||||||
{
|
{
|
||||||
$tmp = dirname(str_replace('\\', '/', $className));
|
$tmp = dirname(str_replace('\\', '/', $className));
|
||||||
$namespace = str_replace('/', '\\', dirname($tmp));
|
$namespace = str_replace('/', '\\', dirname($tmp));
|
||||||
@ -209,6 +209,9 @@ class DoctrineExtension extends LoaderExtension
|
|||||||
|
|
||||||
if (isset($bundleDirs[$namespace]))
|
if (isset($bundleDirs[$namespace]))
|
||||||
{
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$type = false;
|
$type = false;
|
||||||
if (is_dir($dir = $bundleDirs[$namespace].'/'.$class.'/Resources/config/doctrine/metadata'))
|
if (is_dir($dir = $bundleDirs[$namespace].'/'.$class.'/Resources/config/doctrine/metadata'))
|
||||||
{
|
{
|
||||||
@ -231,7 +234,6 @@ class DoctrineExtension extends LoaderExtension
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$ormConfigDef->addMethodCall('setEntityNamespaces', array($aliasMap));
|
$ormConfigDef->addMethodCall('setEntityNamespaces', array($aliasMap));
|
||||||
|
|
||||||
$configuration->setDefinition('doctrine.orm.metadata_driver', $mappingDriverDef);
|
$configuration->setDefinition('doctrine.orm.metadata_driver', $mappingDriverDef);
|
||||||
|
Reference in New Issue
Block a user