Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

2.1.x setDiscriminatorMap fix #326

Merged
merged 1 commit into from

4 participants

Mátyás Somfai Peter Buri László Hornyik Benjamin Eberlei
Mátyás Somfai

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

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

Mátyás Somfai smatyas Fixing a bug when calling setDiscriminatorMap from multiple sources (…
…ie: from Events::loadClassMetadata and annotation).
7d3fee5
Benjamin Eberlei beberlei merged commit 57accea into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2012
  1. Mátyás Somfai

    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
2  lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
View
@@ -1642,7 +1642,7 @@ public function setDiscriminatorMap(array $map)
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.