-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: EavFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
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.valueFROMeav_entityASeINNER JOINeav_entity_varcharASt_dON 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
Component: EavFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release