jagilpe / encryption-bundle

A Symfony Bundle to encrypt sensitive data before persisting it
MIT License
3 stars 1 forks source link

Problème DQL custom Repository #4

Open kshataer opened 3 years ago

kshataer commented 3 years ago

Hi,

We have a question for the DQL custom function using createQueryBuilder at Repository.

The DQL request work will for the encrypted data with the default fuctions at Doctrine\ORM\EntityRepository.php like findBy(), find(), findAll() etc.

But we can't get data from the cutom DQL function at Repository with createQueryBuilder. Like getPatientByLastName()

public function getPatientByLastName($lastname) { return $this->createQueryBuilder('p') ->where('p.lastname like :lastname') ->setParameter('lastname ', '%'.$lastname .'%') ->getQuery()->getResult(); }

lastname is a encrypted colum, data is encrypted , $lastname passing normal string(decrypted).
Is not matching.

Can you give me some hits than could be resove this probleme ? Please.

Kasimu SHATAER