here is my code to retreive users from db :
$qb = $this->createQueryBuilder('c');
$qb->select('c.username')
->where('c.username LIKE :term')
->setParameter('term', '%' . $term . '%')
->where('c.roles LIKE :role')
->setParameter('role', '%"ROLE_COM"%');
$arrayAss = $qb->getQuery()
->getArrayResult();
I want to select only users with the admin role and nothing works.
thaks for helping