If I comment any one of the where/addwhere clause, I end up with the expected result set, but if I have more than 2 parameters bound, it returns an empty array instead of 1 row.
$queryBuilder->getParameters() is returning all 3 parameters.
When using the 3 parameters, if I copy / paste the string returned by $queryBuilder->getSQL(); into Toad and run the query against the database with the parameter values returned by $queryBuilder->getParameters(), I get 1 row.
Same thing happens when I use the setParameters() function instead of setParameter().
Package version
laravel-doctrine/orm v1.2.5 using -> doctrine/orm v2.5.4 Lumen v5.2.7. Oracle database.
If I comment any one of the where/addwhere clause, I end up with the expected result set, but if I have more than 2 parameters bound, it returns an empty array instead of 1 row.
$queryBuilder->getParameters()
is returning all 3 parameters. When using the 3 parameters, if I copy / paste the string returned by$queryBuilder->getSQL();
into Toad and run the query against the database with the parameter values returned by$queryBuilder->getParameters()
, I get 1 row.Same thing happens when I use the setParameters() function instead of setParameter().
Expected behaviour
$results contains 1 row.
Actual behaviour
$results is an empty array.
Link of the issue opened in doctrine-laravel/orm github: https://github.com/laravel-doctrine/orm/issues/179