I created two models to store products: products and product_meta using EAV.
I have to implement the feature of having dynamic fields for products, eg. videos for games, etc. These fields has the following attributes: required, order (The names speak for themselves)
I have two solutions, but one requires another question to be answered.
First solution: Store EAV model fields in config file with their attributes (ordering cannot be done in MySQL query)
Second solution: Store EAV fields in a third model and join them to the query by the EAV key. By this way fields can be ordered, but needs more resources.