From c5966fcdc970c97ab31cc1115d88d145a86b245b Mon Sep 17 00:00:00 2001 From: mcop1 <89011527+mcop1@users.noreply.github.com> Date: Tue, 31 May 2022 13:13:09 +0200 Subject: [PATCH] [Bug]: Query filters not working with logical operators and object bricks attributes (#534) --- src/GraphQL/Helper.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/GraphQL/Helper.php b/src/GraphQL/Helper.php index 1abb6433..9c948153 100644 --- a/src/GraphQL/Helper.php +++ b/src/GraphQL/Helper.php @@ -45,10 +45,8 @@ public static function addJoins(&$list, $filter, $columns, &$mappingTable = []) $nameParts = explode('~', $name); $brickName = $nameParts[0]; $brickKey = $nameParts[1]; - if ($brickKey === $key) { - $list->addObjectbrick($brickName); - $mappingTable[$brickKey] = 1; - } + $list->addObjectbrick($brickName); + $mappingTable[$brickKey] = 1; } } } @@ -109,7 +107,7 @@ public static function buildSqlCondition($defaultTable, $q, $op = null, $subject if (is_array($value)) { $childParts = []; foreach ($value as $arrItem) { - $childParts[] = self::buildSqlCondition($defaultTable, $arrItem, $childOp); + $childParts[] = self::buildSqlCondition($defaultTable, $arrItem, $childOp, $subject, $fieldMappingTable); } $parts[] = implode(' ' . $childOp . ' ', $childParts); } else {