Can't provide a new Where object to the Where::condition() method
Lonnytunes opened this issue · comments
Lonnytunes commented
I built a query looking like this:
$count = $this
->getRunner()
->getQueryBuilder()
->select('...')
// ...
->condition((new Where(Where::OR)) // <- Not accepted.
->isNull('...')
->isNull('...')
->isNull('...')
)
->getCountQuery()
->execute()
->fetchField()
;
Giving a new Where
object to the condition
method results in a QueryError
:
Goat\Query\QueryError: column reference must be a string or an instance of Goat\Query\ExpressionColumn
The problem comes from ExpressionFactory::column()
called at line 119 of Where::condition()
. It only accepts string
or Expression
as argument.
Pierre commented
Cimère Robert !