/** * @return \yii\db\ActiveQuery */ public function getLocality() { return $this->hasOne(Locality::className(), ['Id' => 'localityId']); }