Backend Model performs the loading, saving, deleting, validation of the attribute value. Source Model provides a list of attribute values, which is used for the dropdown/multiselect attributes. Frontend Model performs attribute mapping on the frontend.
The Magento\Framework\EntityManager\EntityManager class was introduced in Magento 2.1 for loading, saving, checking for presence and deleting EAV and Flat objects. To work via EntityManager, you must provide the information about the entity interface in the di.xml file for MetadataPool and for HydratorPool.
We continue exploring the mechanism of EAV data storage in Magento 2. In this article, we will cover Magento 2 attribute types and how they are presented in the admin. In the 2nd part, we will talk about the role of attribute sets and attribute groups.
There is not much difference for a developer in EAV and Flat collections. The creation of models, resource models and collections is very similar. Let’s describe the key differences between EAV and flat table collections and consider creating classes for EAV (City) and Flat (Country). This is Part 2 of the EAV data storage review, check out Part 1 to catch up on the topic.