From 7dd0dd273ecdf6edf7c4d201c6d07ab06b05c256 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 30 Apr 2011 12:49:37 +0200 Subject: [PATCH] [DDC-1109] ltrim discriminator map for convenience. --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index a10d8c866..f556257f9 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -1628,6 +1628,7 @@ class ClassMetadataInfo implements ClassMetadata if (strpos($className, '\\') === false && strlen($this->namespace)) { $className = $this->namespace . '\\' . $className; } + $className = ltrim($className, '\\'); $this->discriminatorMap[$value] = $className; if ($this->name == $className) { $this->discriminatorValue = $value;