From 6816b36cdbfabdab5c319b093f75bacc4cc2dde3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 30 Nov 2015 10:07:00 +0100 Subject: [PATCH] Add backticks inside function to escape the column --- lib/private/systemtag/systemtagobjectmapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/systemtag/systemtagobjectmapper.php b/lib/private/systemtag/systemtagobjectmapper.php index f2adc2e3eb..a4782b0644 100644 --- a/lib/private/systemtag/systemtagobjectmapper.php +++ b/lib/private/systemtag/systemtagobjectmapper.php @@ -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')))