Context: How does \Magento\Eav\Model\Config::getEntityAttributeCodes()
work?
https://github.com/magento/magento2/blob/958164/app/code/Magento/Eav/Model/Config.php#L357-L363
https://github.com/magento/magento2/blob/958164/app/code/Magento/Eav/Model/Config.php#L365-L366
https://github.com/magento/magento2/blob/958164/app/code/Magento/Eav/Model/Config.php#L368-L383
https://github.com/magento/magento2/blob/958164/app/code/Magento/Eav/Model/Config.php#L385-L389
The result of the $this->getSelect()->assemble()
:
SELECT `main_table`.`entity_type_id`, `main_table`.`attribute_code`, `main_table`.`attribute_model`, `main_table`.`backend_model`, `main_table`.`backend_type`, `main_table`.`backend_table`, `main_table`.`frontend_model`, `main_table`.`frontend_input`, `main_table`.`frontend_label`, `main_table`.`frontend_class`, `main_table`.`source_model`, `main_table`.`is_required`, `main_table`.`is_user_defined`, `main_table`.`default_value`, `main_table`.`is_unique`, `main_table`.`note`, `additional_table`.* FROM `eav_attribute` AS `main_table`
INNER JOIN `catalog_eav_attribute` AS `additional_table` ON additional_table.attribute_id = main_table.attribute_id WHERE (main_table.entity_type_id = 4)
https://github.com/magento/magento2/blob/958164/app/code/Magento/Eav/Model/Config.php#L391-L400