When calling findBy with multiple binary strings, the method SQLParserUtils::expandListParameters fails to recognize that the parameters is an array of LOB (ParameterType::LARGE_OBJECT). This leads to an exception in PDOStatement::execute and a further error when the exception handler tries to format the parameters using bin2hex on an array.
Current behaviour
A driver exception is raised because the DBAL doesn't detect a parameter as being an array which leads to an internal exception in PDO.
The type of the parameter is deduced to be 103 (PARAM_LOB + ARRAY MARKER) which fails to pass the test in SQLParserUtils::expandListParameters (line 147):
Bug Report
Summary
When calling findBy with multiple binary strings, the method SQLParserUtils::expandListParameters fails to recognize that the parameters is an array of LOB (ParameterType::LARGE_OBJECT). This leads to an exception in PDOStatement::execute and a further error when the exception handler tries to format the parameters using bin2hex on an array.
Current behaviour
A driver exception is raised because the DBAL doesn't detect a parameter as being an array which leads to an internal exception in PDO.
The type of the parameter is deduced to be 103 (PARAM_LOB + ARRAY MARKER) which fails to pass the test in SQLParserUtils::expandListParameters (line 147):
if ($type !== Connection::PARAM_INT_ARRAY && $type !== Connection::PARAM_STR_ARRAY) { continue; }
How to reproduce
When using an entity with the PK declared as type ParameterType::LARGE_OBJECT, calling findBy with multiple values will fail.
Expected behaviour
The entities are successfully retrieved. Adding
$type !== 103
to the test above fixes the issue.