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