Hello,
I have to do a form where customer can manage prices for products.
We have three tables
1. group_id; group_name
2. entity_id; group_id; some_id
3. item_id; group_id;sku; price
So, i want to fetch all items and show their some_id.
I'm using grid collection for table 3. I've added this join
protected function _initSelect()
{
parent::_initSelect();
$linkTable = $this->getTable('TABLE_2');
$this->getSelect()
->join(
['link' => $linkTable],
'main_table.group_id = link.group_id'
);
$this->getSelect()->group(['main_table.group_id','link.some_id']);
}Rersult of this quesry is
And then i pass this collection into admin grid i got
(Magento\Framework\View\Element\UiComponent\DataProvider\Document) with the same ID "48" already exists.
Maybe someone know how to fix it. or maybe i have to use something different ?
Thanks.