What is the difference between ->addFieldToSelect('name')
and ->addAttributeToSelect('name')
?
1 Answer
addAttributeToSelect() is used to select EAV collections. (like https://devdocs.magento.com/guides/v2.3/extension-dev-guide/attributes.html#customer-eav-attribute)
addFieldToSelect() is used to select Non-EAV collections.
-
-
Any flat tables are non-eav collections. Like if you create a custom table for your custom module then you can say that is flat table/non-eav collections. Commented Dec 15, 2022 at 23:23