Esempio n. 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPriceCategory()
 {
     return $this->hasOne(PriceCategory::className(), ['id' => 'price_category_id']);
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPriceCategories()
 {
     return $this->hasMany(PriceCategory::className(), ['id' => 'price_category_id'])->viaTable('{{%price}}', ['product_id' => 'id']);
 }