Skip to content

Commit 5fd92fc

Browse files
committed
fixed where condition
1 parent 6cf4b06 commit 5fd92fc

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Catalog/Model/ResourceModel/Product

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function getMediaRecords(int $storeId, array $entityIds, bool $preserveSo
174174
$output = [];
175175
$linkField = $this->metadata->getLinkField();
176176
$select = $this->createBatchBaseSelect($storeId)
177-
->where('cpe.' . $linkField . ' IN (?)', $entityIds);
177+
->where('cpe.entity_id IN (?)', $entityIds);
178178
if (!$preserveSortOrder) {
179179
// due to performance consideration it is better to do not use sorting for this query
180180
$select->reset(Select::ORDER);

0 commit comments

Comments
 (0)