0

What is the difference between ->addFieldToSelect('name') and ->addAttributeToSelect('name')?

1 Answer 1

2
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.
2
  • What would be non-EAV collections? Commented Dec 15, 2022 at 20:54
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.