there are several tables

groups (id, title,)

feature_group (group_id, feature_id)

Product {id, group_id, title}

Feature {id, type, slug, caption}

feature_value_product (product_id, feature_value_id)

FeatureValue {id, feature_id, value}

How to organize a connection in such a way that you can get something like All connections work fine, for example, Product :: find (1) -> group-> features-> load ('values') Easily get the product, the characteristics associated with the group (features ) Based on the appeared features collection from the FeatureValue table, we get all their possible values ​​(for example, to display in the select field)

The problem is this, you need to download not only possible options for previously added values, but also values ​​associated with a specific product through the feature_value_product label

Maybe somehow Product :: find (1) -> group-> features-> load ('values', 'productValues')

But as I have not struggled yet, it’s impossible to connect the Features with values ​​in the product

    0