diff --git a/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php index 062f54b31..95cffa125 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php @@ -297,10 +297,11 @@ abstract class AbstractHydrator if( isset($cacheKeyInfo['discriminatorColumn']) && isset($data[$cacheKeyInfo['discriminatorColumn']]) && - $data[$cacheKeyInfo['discriminatorColumn']] != $cacheKeyInfo['discriminatorValue'] + $data[$cacheKeyInfo['discriminatorColumn']] !== $cacheKeyInfo['discriminatorValue'] ){ break; } + // in an inheritance hierarchy the same field could be defined several times. // We overwrite this value so long we don't have a non-null value, that value we keep. // Per definition it cannot be that a field is defined several times and has several values.