Commit 31f0e25b by it3rmit

Small changes according to the class reference

It looks like this values are supposed to be in different order due to the class reference and practice.
parent a87e589a
...@@ -930,7 +930,7 @@ class Feature extends \yii\db\ActiveRecord ...@@ -930,7 +930,7 @@ class Feature extends \yii\db\ActiveRecord
public function getProduct() public function getProduct()
{ {
return $this->hasOne(Product::className(), ['product_id' => 'id']); return $this->hasOne(Product::className(), ['id' => 'product_id']);
} }
} }
...@@ -940,7 +940,7 @@ class Product extends \yii\db\ActiveRecord ...@@ -940,7 +940,7 @@ class Product extends \yii\db\ActiveRecord
public function getFeatures() public function getFeatures()
{ {
return $this->hasMany(Feature::className(), ['id' => 'product_id']); return $this->hasMany(Feature::className(), ['product_id' => 'id']);
} }
} }
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment