From e28c7c4523367efa768e34aa86cb2266cc1468c0 Mon Sep 17 00:00:00 2001 From: Divesh Pahuja Date: Tue, 1 Aug 2023 17:36:11 +0200 Subject: [PATCH] Fix querying object list by fullpath - resolves #776 (#778) --- 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 0221be41..bb89fa41 100644 --- a/src/GraphQL/Resolver/QueryType.php +++ b/src/GraphQL/Resolver/QueryType.php @@ -293,7 +293,7 @@ public function resolveObjectGetter($value = null, $args = [], $context = [], Re if ($isFullpathSet) { $fullpath = Service::correctPath($args['fullpath']); - $conditionParts[] = sprintf('(concat(%s, %s) =' . Db::get()->quote($fullpath) . ')', + $conditionParts[] = sprintf('(CONCAT(`%s`,`%s`) =' . Db::get()->quote($fullpath) . ')', Service::getVersionDependentDatabaseColumnName('o_path'), Service::getVersionDependentDatabaseColumnName('o_key')); } @@ -423,7 +423,7 @@ static function ($fullpath) use ($db) { }, str_getcsv($args['fullpaths'], ',', "'") ); - $conditionParts[] = sprintf('(concat(%s, %s) IN (' . implode(',', $quotedFullpaths) . '))', + $conditionParts[] = sprintf('(CONCAT(`%s`,`%s`) IN (' . implode(',', $quotedFullpaths) . '))', Service::getVersionDependentDatabaseColumnName('o_path'), Service::getVersionDependentDatabaseColumnName('o_key')); }