From 31f0e25b3fb1da32b295d2e45ff83f854b4f411d Mon Sep 17 00:00:00 2001 From: it3rmit Date: Wed, 14 May 2014 10:07:15 +0300 Subject: [PATCH] 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. --- docs/guide/db-active-record.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/db-active-record.md b/docs/guide/db-active-record.md index 584f8c7c5f..43822b4e88 100644 --- a/docs/guide/db-active-record.md +++ b/docs/guide/db-active-record.md @@ -930,7 +930,7 @@ class Feature extends \yii\db\ActiveRecord 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() { - return $this->hasMany(Feature::className(), ['id' => 'product_id']); + return $this->hasMany(Feature::className(), ['product_id' => 'id']); } } ```