10000 add 'guid' to list of exception to filter out · symfony/symfony@0de86ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 0de86ff

Browse files
garakfabpot
authored andcommitted
add 'guid' to list of exception to filter out
1 parent a842eda commit 0de86ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ public function getEntitiesByIds($identifier, array $values)
9393
$values = array_values(array_filter($values, function ($v) {
9494
return (string) $v === (string) (int) $v;
9595
}));
96+
} elseif ('guid' === $metadata->getTypeOfField($identifier)) {
97+
$parameterType = Connection::PARAM_STR_ARRAY;
98+
99+
// Like above, but we just filter out empty strings.
100+
$values = array_values(array_filter($values, function ($v) {
101+
return (string) $v !== '';
102+
}));
96103
} else {
97104
$parameterType = Connection::PARAM_STR_ARRAY;
98105
}

0 commit comments

Comments
 (0)
0