/**
  * @return \yii\db\ActiveQuery
  */
 public function getProd()
 {
     return $this->hasOne(Products::className(), ['id' => 'product_id']);
 }
Exemple #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProducts()
 {
     return $this->hasMany(Products::className(), ['id' => 'product_id'])->viaTable('{{%prices}}', ['price_type_id' => 'id']);
 }