Skip to content

Commit 821168d

Browse files
committed
MAGETWO-47981: Stabilize bamboo integration tests for Catalog module
1 parent 8e49356 commit 821168d

File tree

1 file changed

+10
-2
lines changed
  • app/code/Magento/Catalog/Model/ResourceModel

1 file changed

+10
-2
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Url.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,17 @@ protected function _getCategoryAttribute($attributeCode, $categoryIds, $storeId)
202202
$select->from(
203203
$attributeTable,
204204
[$linkField, 'value']
205+
)->joinLeft(
206+
['e' => $this->getTable('catalog_category_entity')],
207+
"e.{$linkField} = t1.{$linkField}",
208+
[]
205209
)->where(
206210
'attribute_id = :attribute_id'
207211
)->where(
208212
'store_id = ?',
209213
0
210214
)->where(
211-
'entity_id IN(?)',
215+
'e.entity_id IN(?)',
212216
$categoryIds
213217
);
214218
$bind['attribute_id'] = $this->_categoryAttributes[$attributeCode]['attribute_id'];
@@ -221,13 +225,17 @@ protected function _getCategoryAttribute($attributeCode, $categoryIds, $storeId)
221225
['t2' => $attributeTable],
222226
"t1.{$linkField} = t2.{$linkField} AND t1.attribute_id = t2.attribute_id AND t2.store_id = :store_id",
223227
[]
228+
)->joinLeft(
229+
['e' => $this->getTable('catalog_category_entity')],
230+
"e.{$linkField} = t1.{$linkField}",
231+
[]
224232
)->where(
225233
't1.store_id = ?',
226234
0
227235
)->where(
228236
't1.attribute_id = :attribute_id'
229237
)->where(
230-
"t1.{$linkField} IN(?)",
238+
"e.entity_id IN(?)",
231239
$categoryIds
232240
);
233241

0 commit comments

Comments
 (0)