Experiments
1 | <?php |
1 | ... |
Now we get the proudct’s eav attributes.
Notes
Source: Magento\Eav\Model\Entity\AbstractEntity
See _loadModelAttributes()
in the above fle for details about the loading process. Magento creates a UNION select to load attributes from each of the entity type tables to locate the applicable attribute values. See _collectSaveData()
in the above fle for how the saving process works. EAV collections offer other methods such as addAttributeToSelect (note that the feld methods, such as addFieldToFilter have been mapped to their attribute counterparts). Simple resource model extens Magento\Framework\Model\ResourceModel\Db\AbstractDb
References
Magento 2: Creating New Eav Entity and Model (Updated for Data Installation)