D
D
dsx902017-10-05 22:10:44
Yii
dsx90, 2017-10-05 22:10:44

How can I get to the array of parent characteristics in a single-table site structure?

59d6802949866934495381.png
In general, I have such an intricate scheme turned out now I need to somehow get to the array of options that is located at the parent of the product. Through a many-to-many relationship launch_id = id
If more detailed, then I add the necessary options in the product category. And already in the product, I select the available options, fill in the value of these options in product_otion_value
If not done on a single-table structure, then the query looked like this

public function getCategory()
    {
        return $this->hasOne(PostCategory::className(), ['id' => 'category_id']);
    }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question