Skip to content

Commit

Permalink
Merge pull request #395 from rubanooo/fix-join-attributes-warning
Browse files Browse the repository at this point in the history
Fix warnings when adding operators to configuration
  • Loading branch information
weisswurstkanone authored Jul 28, 2021
2 parents cfad175 + f662c1b commit b7ae073
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/GraphQL/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,18 @@ public static function addJoins(&$list, $filter, $columns, &$mappingTable = [])
foreach ($parts as $key => $value) {
foreach ($columns as $column) {
$attributes = $column['attributes'];
$name = $attributes['attribute'];

if (strpos($name, '~') !== false) {
$nameParts = explode('~', $name);
$brickName = $nameParts[0];
$brickKey = $nameParts[1];
if ($brickKey === $key) {
$list->addObjectbrick($brickName);
$mappingTable[$brickKey] = 1;

if (isset($attributes['attribute'])) {
$name = $attributes['attribute'];

if (strpos($name, '~') !== false) {
$nameParts = explode('~', $name);
$brickName = $nameParts[0];
$brickKey = $nameParts[1];
if ($brickKey === $key) {
$list->addObjectbrick($brickName);
$mappingTable[$brickKey] = 1;
}
}
}
}
Expand Down

0 comments on commit b7ae073

Please sign in to comment.