1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Merge pull request #328 from Netpositive/master

addDiscriminatorMapClass fix
This commit is contained in:
Benjamin Eberlei 2012-04-07 00:44:29 -07:00
commit a1a9f85fda

View File

@ -2044,7 +2044,7 @@ class ClassMetadataInfo implements ClassMetadata
if ( ! class_exists($className)) {
throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
}
if (is_subclass_of($className, $this->name)) {
if (is_subclass_of($className, $this->name) && ! in_array($className, $this->subClasses)) {
$this->subClasses[] = $className;
}
}