From e9142b0dd0fed57c9b8c6ac016c9670c239d0f7e Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 23 Nov 2016 19:20:12 +0200 Subject: [PATCH] add create_item to translate --- models/EventsToProducts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/EventsToProducts.php b/models/EventsToProducts.php index d96372f..7b54445 100755 --- a/models/EventsToProducts.php +++ b/models/EventsToProducts.php @@ -55,7 +55,7 @@ class EventsToProducts extends \yii\db\ActiveRecord */ public function getEvent() { - return $this->hasOne(Event::className(), ['event_id' => 'event_id']); + return $this->hasOne(Event::className(), ['id' => 'event_id']); } /** @@ -63,6 +63,6 @@ class EventsToProducts extends \yii\db\ActiveRecord */ public function getProduct() { - return $this->hasOne(Product::className(), ['product_id' => 'product_id']); + return $this->hasOne(Product::className(), ['id' => 'product_id']); } } -- libgit2 0.21.4