Skip to content

Commit 57a46f7

Browse files
committed
ACP2E-1199: reset additionalGridTables to avoid previous entities dependency.
1 parent 2000428 commit 57a46f7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ public function addAdditionalGridTable(string $table): IdListBuilder
5454
return $this;
5555
}
5656

57+
/**
58+
* Reset added additional grid table where entities may already exist.
59+
*
60+
* @return $this
61+
*/
62+
public function resetAdditionalGridTable(): IdListBuilder
63+
{
64+
$this->additionalGridTables = [];
65+
66+
return $this;
67+
}
68+
5769
/**
5870
* Returns connection.
5971
*
@@ -112,7 +124,6 @@ public function build(string $mainTableName, string $gridTableName): Select
112124
)
113125
->where($table . '.entity_id IS NULL');
114126
}
115-
$this->additionalGridTables = [];
116127
return $select;
117128
}
118129
}

0 commit comments

Comments
 (0)