/** * @return \yii\db\ActiveQuery */ public function getWinery() { return $this->hasOne(Wineries::className(), ['id' => 'winery_id']); }
/** * @return \yii\db\ActiveQuery */ public function getWineries() { return $this->hasMany(Wineries::className(), ['default_appellation_id' => 'id']); }