Issue Bug Closed

#80425Constraint 'IN' in Query doesn't respect string escaping

Kai Ole Hartwig 03/23/17, 19:45 updated 10/02/18, 11:00

Description

When building a query inside a repository method using $this->createQuery() and defining an ‘IN’ constraint by chaining the methods $query->matching() and $query->in() the execution of the query yields an SQL error.

#1472074379: Unknown column ‘foo’ in ‘where clause’

Code example:

public function findUsingOptions()
{
$options = [
‘foo’,
‘bar’,
‘foobar’,
];

$query = $this->createQuery();
$query->matching($query->in(‘my_column’, $options));
return $query->execute();
}

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.