Fixing a bug when calling setDiscriminatorMap from multiple sources (ie: from Events::loadClassMetadata and annotation).
This commit is contained in:
parent
5b18718b92
commit
a2fd4eca37
@ -2044,7 +2044,7 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
if ( ! class_exists($className)) {
|
if ( ! class_exists($className)) {
|
||||||
throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
|
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;
|
$this->subClasses[] = $className;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user