/** * @return \yii\db\ActiveQuery */ public function getIdMotorista() { return $this->hasOne(Motorista::className(), ['cnh' => 'id_motorista']); }