Add backticks inside function to escape the column

This commit is contained in:
Joas Schilling 2015-11-30 10:07:00 +01:00
parent b666367a79
commit 6816b36cdb
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class SystemTagObjectMapper implements \OCP\SystemTag\ISystemTagObjectMapper {
$this->assertTagsExist($tagIds);
$query = $this->connection->getQueryBuilder();
$query->select($query->createFunction('DISTINCT(objectid)'))
$query->select($query->createFunction('DISTINCT(`objectid`)'))
->from(self::RELATION_TABLE)
->where($query->expr()->in('systemtagid', $query->createParameter('tagids')))
->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype')))