Hello Magento Core Team,
After few months working on Magento 2, we have a question regarding Repositories and ResourceModels.
We consider the following :
- The "Model" represents the Entity, so we should only use it as a getter/setter object, without "_init".
- The repository purpose is to handle storage and retrieval of Entities
If so, what is the purpose of ModelResource ? Using it on Magento 2 imply using old method naming (_construct, _init, etc).
We finaly decided to create a custom Abstract Repository handling storage and retrieval in place of ModelResource for our custom entities. Now, we have only two objects to create for custom Model : Our Entity (Model) and our Repository.
Is this the good way ? Should we still implement ResourceModel ?
Best Regards.
Damien.