/** * @return \yii\db\ActiveQuery */ public function getComunidad() { return $this->hasOne(Comunidad::className(), ['id' => 1]); }
/** * @return \yii\db\ActiveQuery */ public function getComunidads() { return $this->hasMany(Comunidad::className(), ['id_cant' => 'id_cant']); }