Merge pull request #3464 from it3rmit/patch-4

Small changes according to the class reference
This commit is contained in:
Carsten Brandt
2014-05-14 09:31:24 +02:00

View File

@@ -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']);
} }
} }
``` ```