/** * @return \yii\db\ActiveQuery */ public function getPaciente() { return $this->hasOne(Paciente::className(), ['id' => 'paciente_id']); }
/** * @return \yii\db\ActiveQuery */ public function getPacientes() { return $this->hasMany(Paciente::className(), ['persona_id' => 'id']); }