Skip to content

Conversation

@wkaminsk
Copy link
Collaborator

@wkaminsk wkaminsk commented Jun 28, 2022

To fetch order entity from database, we use magento collection with filters for entity_id (primary key) and increment id (magento public order number) - it's impossible to fetch more than one order for this combination.
Magento/AdobeCommerce (AC) has a validation to prevent adding two items to collections with same primary key (in this case it's entity_id from sales_order table)
The issue is related to additional left join added to 3rd party extension. When order has more than one order item, it's duplicating results in the collection.

Solution is to set limit for db query and fetch only one item.

Copy link

@Daniel-Shai Daniel-Shai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIS-420

Copy link

@Daniel-Shai Daniel-Shai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to TIS-420

@wkaminsk wkaminsk changed the title Prevent loading multiple rows TIS-420 Prevent loading multiple rows Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants