Skip to content

Commit 191929a

Browse files
committed
Merge remote-tracking branch 'origin/ACP2E-4159' into PR_2025_09_08_muntianu
2 parents 2d4d7d6 + 74493e0 commit 191929a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ private function getCountFromCategoryTableBulk(
408408
)
409409
->joinInner(
410410
['ce2' => $this->getTable('catalog_category_entity')],
411-
'ce2.path LIKE CONCAT(ce.path, \'/%\') OR ce2.entity_id = ce.entity_id',
411+
'ce2.path LIKE CONCAT(ce.path, \'/%\')',
412412
[]
413413
)
414414
->where('ce.entity_id IN (?)', $categoryIds);

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Category/CollectionTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,12 @@ public function testLoadProductCountCallsBulkMethodForLargeCategoryCount()
255255
$this->connection->expects($this->once())->method('dropTemporaryTable')
256256
->with($this->stringContains('temp_category_descendants_'));
257257
$this->select->method('from')->willReturnSelf();
258-
$this->select->method('joinInner')->willReturnSelf();
258+
$this->select->expects($this->once())->method('joinInner')
259+
->with(
260+
['ce2' => null],
261+
'ce2.path LIKE CONCAT(ce.path, \'/%\')',
262+
[]
263+
)->willReturnSelf();
259264
$this->select->method('where')->willReturnSelf();
260265
$this->connection->method('select')->willReturn($this->select);
261266
$this->connection->method('insertFromSelect')->willReturn('INSERT QUERY');

0 commit comments

Comments
 (0)