/** * @return \yii\db\ActiveQuery */ public function getCity() { return $this->hasMany(City::className(), ['country_code' => 'code']); }
public function getCity() { return $this->hasOne(City::className(), ['Id' => 'cityId']); }
/** * @return \yii\db\ActiveQuery */ public function getCityTo() { return $this->hasOne(City::className(), ['code' => 'city_to_code']); }