/** * @return \yii\db\ActiveQuery */ public function getWeatherAlert() { return $this->hasOne(WeatherAlert::className(), ['id' => 'WeatherAlert_id']); }
/** * @return \yii\db\ActiveQuery */ public function getWeatherAlert() { return $this->hasOne(WeatherAlert::className(), ['id' => 'WeatherAlert_id'])->from(['WeatherAlertAlias' => WeatherAlert::tableName()]); }