Question

Is it necessary to follow EAV with the models I create for my modules? If not always, when should I and when shouldn't I?

Was it helpful?

Solution

No it is not necessary, especially if you're using your own tables and your own schema for data storage; and that schema is fixed (not end-user-defined).

EAV was used as the basis of Customer, Products (and, once upon a time, Sales) because the schema (business needs) for every install of Magento is potentially different - e.g. some may want to gather a customer's Pet Name during registration, while others would want a product attribute called Flavor.

In short, define your application's scope and the data storage schema - then use Magento's built-in Resource models (ORM) to provide access and CRUD capabilities.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top