1
0
mirror of synced 2024-12-13 22:56:04 +03:00

[DDC-1109] ltrim discriminator map for convenience.

This commit is contained in:
Benjamin Eberlei 2011-04-30 12:49:37 +02:00
parent b462cfbe2b
commit 7dd0dd273e

View File

@ -1628,6 +1628,7 @@ class ClassMetadataInfo implements ClassMetadata
if (strpos($className, '\\') === false && strlen($this->namespace)) { if (strpos($className, '\\') === false && strlen($this->namespace)) {
$className = $this->namespace . '\\' . $className; $className = $this->namespace . '\\' . $className;
} }
$className = ltrim($className, '\\');
$this->discriminatorMap[$value] = $className; $this->discriminatorMap[$value] = $className;
if ($this->name == $className) { if ($this->name == $className) {
$this->discriminatorValue = $value; $this->discriminatorValue = $value;