/** * @return \yii\db\ActiveQuery */ public function getRelIdRebanho() { return $this->hasOne(Rebanho::className(), ['idRebanho' => 'idRebanho']); }
/** * @return \yii\db\ActiveQuery */ public function getRebanhos() { return $this->hasMany(Rebanho::className(), ['idNucleo' => 'idNucleo']); }