Вопрос

What are the differences between a Model and a Resource model? Also what is a model and a resource model?

Это было полезно?

Решение

Models : Models are where your main business logic should be handled and is a single instance of an object. The model will use the resource model to talk to the database and get/set data for it on save() and load().

Resource Model : A resource model is where your main C.R.U.D happens (Create, Read, Update and delete). The resource model shouldn’t contain business logic however it will talk to the adapters and basically talk to the database.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top