Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
ORM EAV Dynamic fields
  • 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.

    What do you think?

    Thanks
  • EAV attributes should be unique, and is meant for objects with undetermined attributes. This seems to me more like a standard one-to-many design?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion