Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

2.2 addDiscriminatorMapClass fix #327

Merged
merged 1 commit into from

4 participants

@smatyas

Fixing a bug when calling setDiscriminatorMap from multiple sources (ie: from Events::loadClassMetadata and annotation).

http://www.doctrine-project.org/jira/browse/DDC-1763

@smatyas smatyas Fixing a bug when calling setDiscriminatorMap from multiple sources (…
…ie: from Events::loadClassMetadata and annotation).
c3fa29f
@beberlei beberlei merged commit f628a7f into doctrine:2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2012
  1. @smatyas

    Fixing a bug when calling setDiscriminatorMap from multiple sources (…

    smatyas authored
    …ie: from Events::loadClassMetadata and annotation).
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
View
2  lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
@@ -1993,7 +1993,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;
}
}
Something went wrong with that request. Please try again.