Skip to content

Commit e676b3a

Browse files
committed
Replace nestead query with separate queries in the entity filter processor
1 parent d76acc2 commit e676b3a

File tree

1 file changed

+3
-2
lines changed
  • app/code/Magento/MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor

1 file changed

+3
-2
lines changed

app/code/Magento/MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/Entity.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public function apply(Filter $filter, AbstractDb $collection): bool
6464
*/
6565
private function getSelectByEntityIds(array $ids): Select
6666
{
67-
return $this->connection->getConnection()->select()->from(
67+
$connection = $this->connection->getConnection();
68+
return $connection->fetchAssoc($connection->select()->from(
6869
['asset_content_table' => $this->connection->getTableName(self::TABLE_MEDIA_CONTENT_ASSET)],
6970
['asset_id']
7071
)->where(
@@ -73,6 +74,6 @@ private function getSelectByEntityIds(array $ids): Select
7374
)->where(
7475
'entity_id IN (?)',
7576
$ids
76-
);
77+
));
7778
}
7879
}

0 commit comments

Comments
 (0)