mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 22:09:48 +08:00
Merge pull request #3464 from it3rmit/patch-4
Small changes according to the class reference
This commit is contained in:
@@ -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
|
|||||||
|
|
||||||
public function getFeatures()
|
public function getFeatures()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Feature::className(), ['id' => 'product_id']);
|
return $this->hasMany(Feature::className(), ['product_id' => 'id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user