Skip to content

Commit e7cd7b0

Browse files
authored
ENGCOM-7567: Fix issue when db_prefix is used #28300
2 parents ce524ce + bcb9da0 commit e7cd7b0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/code/Magento/MediaGallery/Model/Keyword/Command/GetAssetKeywords.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ public function execute(int $assetId): array
6767
{
6868
try {
6969
$connection = $this->resourceConnection->getConnection();
70+
$tableAssetKeyword = $this->resourceConnection->getTableName(self::TABLE_ASSET_KEYWORD);
7071

7172
$select = $connection->select()
7273
->from(['k' => $this->resourceConnection->getTableName(self::TABLE_KEYWORD)])
73-
->join(['ak' => self::TABLE_ASSET_KEYWORD], 'k.id = ak.keyword_id')
74+
->join(['ak' => $tableAssetKeyword], 'k.id = ak.keyword_id')
7475
->where('ak.asset_id = ?', $assetId);
7576
$data = $connection->query($select)->fetchAll();
7677

app/code/Magento/MediaGallery/Model/ResourceModel/Keyword/GetAssetsKeywords.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private function getKeywordsData(array $assetIds): array
8787
$connection = $this->resourceConnection->getConnection();
8888
$select = $connection->select()
8989
->from(['k' => $this->resourceConnection->getTableName(self::TABLE_KEYWORD)])
90-
->join(['ak' => self::TABLE_ASSET_KEYWORD], 'k.id = ak.keyword_id')
90+
->join(['ak' => $this->resourceConnection->getTableName(self::TABLE_ASSET_KEYWORD)], 'k.id = ak.keyword_id')
9191
->where('ak.asset_id IN (?)', $assetIds);
9292
return $connection->query($select)->fetchAll();
9393
}

0 commit comments

Comments
 (0)