示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getWines()
 {
     return $this->hasMany(Wines::className(), ['winery_id' => 'id']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getWine()
 {
     return $this->hasOne(Wines::className(), ['id' => 'wine_id']);
 }