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?
Asked
Active
Viewed 102 times
1 Answers
3
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.
philwinkle
- 35,751
- 5
- 91
- 145
-
Don't forget customer address and categories! :-) – benmarks May 28 '13 at 16:14
-
And Credit Memo, Invoice and Shipment... and (EE) RMA Item... – philwinkle May 28 '13 at 16:18
-
1Credit and invoice were flattened along with other sales entities...? – benmarks May 28 '13 at 16:26
-
LOL I thought we were compiling the full list of once upon a time. Le sigh. – philwinkle May 28 '13 at 16:56