From 9253669ed90f5b655637b9fdcd455c274e5aa8a0 Mon Sep 17 00:00:00 2001
From: Vladyslav Shcherbyna <vshcherbyna@magento.com>
Date: Tue, 26 Jan 2016 14:51:56 +0200
Subject: [PATCH] MAGETWO-47398: Fix L2

---
 app/code/Magento/Bundle/Model/ResourceModel/Selection.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php
index 5fbaea72417..b67f9c0f314 100644
--- a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php
+++ b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php
@@ -120,10 +120,11 @@ class Selection extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
             true
         )->from(
             $this->getMainTable(),
-            'parent_product_id'
+            ''
         )->join(
             ['e' => $this->metadataPool->getMetadata(ProductInterface::class)->getEntityTable()],
-            'e.' . $metadata->getLinkField() . ' = ' .  $this->getMainTable() . '.parent_product_id'
+            'e.' . $metadata->getLinkField() . ' = ' .  $this->getMainTable() . '.parent_product_id',
+            ['e.entity_id as parent_product_id']
         )->where(
             'e.entity_id IN(?)',
             $childId
-- 
GitLab