/** * @return \yii\db\ActiveQuery */ public function getIdPreparat() { return $this->hasOne(Preparat::className(), ['preparat_id' => 'id_preparat'])->from(['idPreparat' => Preparat::tableName()]); }