1
0
mirror of synced 2025-01-09 10:37:09 +03:00

DDC-3065 - applying hotfix that allows NULL in IN() criteria

This commit is contained in:
Marco Pivetta 2014-04-03 17:17:58 +02:00
parent a8b96803a4
commit 733102b4a1

View File

@ -1534,7 +1534,13 @@ class BasicEntityPersister implements EntityPersister
}
if (is_array($value)) {
return sprintf('%s IN (%s)' , $condition, $placeholder);
$in = sprintf('%s IN (%s)' , $condition, $placeholder);
if (false !== array_search(null, $value, true)) {
return sprintf('(%s OR %s IS NULL)' , $in, $condition);
}
return $in;
}
if ($value === null) {