From 0263330f6cda7c61132dd165d23f74a999299933 Mon Sep 17 00:00:00 2001 From: Artem Iksanov Date: Fri, 16 Feb 2024 15:35:35 +0300 Subject: [PATCH] Fix: use version dependent database column name on tags filter query (#833) --- src/GraphQL/Resolver/QueryType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GraphQL/Resolver/QueryType.php b/src/GraphQL/Resolver/QueryType.php index bb89fa41..1e4977cf 100644 --- a/src/GraphQL/Resolver/QueryType.php +++ b/src/GraphQL/Resolver/QueryType.php @@ -438,10 +438,10 @@ static function ($fullpath) use ($db) { return $db->quote($tag); }, $args['tags']))); - $conditionParts[] = "o_id IN ( + $conditionParts[] = sprintf("%s IN ( SELECT cId FROM tags_assignment INNER JOIN tags ON tags.id = tags_assignment.tagid WHERE - ctype = 'object' AND LOWER(tags.name) IN (" . $tags . '))'; + ctype = 'object' AND LOWER(tags.name) IN (", Service::getVersionDependentDatabaseColumnName('o_id')) . $tags . '))'; } // paging