Closed
Description
Preconditions
- Magento EE 2.2.5
- MySQL 5.7, PHP 7.1.14
Steps to reproduce
- Create new Entity Type with InstallData Script. Use eav_entity table as entity table with some random attributes.
- Create Default EAV Model, ResourceModel and Collection
- Use collection, addFieldToSelect of one of the attributes and load them.
Expected result
- Entries with added attribute
Actual result
- Integrity constraint violation: 1052 Column 'entity_type_id' in where clause is ambiguous, query was: SELECT
e
.entity_id
,t_d
.attribute_id
,t_d
.value
FROMeav_entity
ASe
INNER JOINeav_entity_varchar
ASt_d
ON e.entity_id = t_d.entity_id WHERE ( e.entity_id IN (1)) AND (t_d.attribute_id IN ('464')) AND (entity_type_id =12)
Quick fix:
- Magento\Eav\Model\Entity\Collection\AbstractCollection.php ~line 1235
- Add to $select->where(..) statement: 'e.entity_type_id =?' instead of 'entity_type_id'
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release