We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d21efbb commit ce2af16Copy full SHA for ce2af16
app/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product/Collection.php
@@ -441,8 +441,10 @@ private function getMetadataPool()
441
*/
442
private function joinProductsToLinks()
443
{
444
- $linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
445
- $this->getSelect()
446
- ->join(['cpe' => 'catalog_product_entity'], "links.product_id = cpe.$linkField", []);
+ if ($this->_hasLinkFilter) {
+ $linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
+ $this->getSelect()
447
+ ->join(['cpe' => 'catalog_product_entity'], "links.product_id = cpe.$linkField", []);
448
+ }
449
}
450
0 commit comments