Skip to content

Commit c193393

Browse files
committed
MAGETWO-66402: Backward Incompatible Change
- Fix making to remove ambiguity on entity_id
1 parent 70180cd commit c193393

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

app/code/Magento/Customer/Model/ResourceModel/Grid/Collection.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ class Collection extends \Magento\Framework\View\Element\UiComponent\DataProvide
1919
*/
2020
protected $document = Document::class;
2121

22+
/**
23+
* @inheritdoc
24+
*/
25+
protected $_map = ['fields' => ['entity_id' => 'main_table.entity_id']];
26+
2227
/**
2328
* Initialize dependencies.
2429
*

app/code/Magento/Ui/Component/MassAction/Filter.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,10 @@ private function getFilterIds()
225225
$idsArray = $this->getDataProvider()->getAllIds();
226226
} else {
227227
$searchResult = $this->getDataProvider()->getSearchResult();
228-
if ($searchResult instanceof \Magento\Eav\Model\Entity\Collection\AbstractCollection
229-
|| $searchResult instanceof \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
230-
) {
231-
// Use collection's getItems for optimization purposes.
232-
$idsArray = $searchResult->getAllIds();
233-
} else {
234-
// Use compatible search api getItems when searchResult is not a collection.
235-
foreach ($searchResult->getItems() as $item) {
236-
/** @var $item \Magento\Framework\Api\Search\DocumentInterface */
237-
$idsArray[] = $item->getId();
238-
}
228+
// Use compatible search api getItems when searchResult is not a collection.
229+
foreach ($searchResult->getItems() as $item) {
230+
/** @var $item \Magento\Framework\Api\Search\DocumentInterface */
231+
$idsArray[] = $item->getId();
239232
}
240233
}
241234
return $idsArray;

0 commit comments

Comments
 (0)