1
0
mirror of synced 2025-02-02 21:41:45 +03:00

comparison on discriminator value with !==

This commit is contained in:
Full 2017-04-02 14:37:29 +02:00 committed by Marco Pivetta
parent 82db643b4f
commit db9c12f1af
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -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.