Closed
Description
Hi!
About the collection vendor/magento/module-eav/Model/ResourceModel/Entity/Attribute/Option/Collection.php, the method setAttribbuteFilter call the method addFieldToFilter without specify the table.
So, when we join some tables with a column 'attribute_id' (example: 'catalog_product_entity_int'), we have the error 'ambiguous column name'.
Preconditions
Magento EE 2.1.12
Steps to reproduce
- Create a class with a property Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\CollectionFactory
- Create a collection with it and join tables like 'catalog_product_entity_int'
- Get items of the collection.
Expected result
- Have the items
Actual result
1.error 'ambiguous column name'
a solution would be on the method setAttributeFilter of the class vendor/magento/module-eav/Model/ResourceModel/Entity/Attribute/Option/Collection.php : replace 'return $this->addFieldToFilter('attribute_id', $setId);' by 'return $this->addFieldToFilter('main_table.attribute_id', $setId);'
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.1 release lineThe 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 passed
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
orlangur commentedon Apr 8, 2018
@PierreLeMaguer true!
setIdFilter
already uses similar prefix.Feel free to propose such doubtless observations directly as a pull request. Could you create one now please? It is possible even via GitHub UI without necessity to clone repository locally.
magento-engcom-team commentedon Apr 11, 2018
Hi @PierreLeMaguer. Thank you for your report.
The issue has been fixed in #14596 by @PierreLeMaguer in 2.1-develop branch
Related commit(s):
The fix will be available with the upcoming 2.1.14 release.
magento-engcom-team commentedon Apr 11, 2018
Hi @PierreLeMaguer. Thank you for your report.
The issue has been fixed in #14599 by @PierreLeMaguer in 2.2-develop branch
Related commit(s):
The fix will be available with the upcoming 2.2.5 release.
magento-engcom-team commentedon Apr 18, 2018
Hi @PierreLeMaguer. Thank you for your report.
The issue has been fixed in #14676 by @rostyslav-hymon in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.0 release.