Skip to content

Commit

Permalink
Merge pull request doctrine#328 from Netpositive/master
Browse files Browse the repository at this point in the history
addDiscriminatorMapClass fix
  • Loading branch information
beberlei committed Apr 7, 2012
2 parents d6ccd82 + a2fd4ec commit a1a9f85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2044,7 +2044,7 @@ public function addDiscriminatorMapClass($name, $className)
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;
}
}
Expand Down

0 comments on commit a1a9f85

Please sign in to comment.