Commit 679eb0ce authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction recherche des rôles via IndividuRole: le source code dans Individu est préfixé!

parent d2672c9c
Loading
Loading
Loading
Loading
Loading
+2 −2
Changes for module/Application/src/Application/Service/Role/RoleService.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -65,9 +65,9 @@ class RoleService extends BaseService
        $repo = $this->entityManager->getRepository(IndividuRole::class);
        $qb = $repo->createQueryBuilder("ro")
            ->addSelect('i, r')
            ->join('ro.individu', 'i', Join::WITH, 'i.sourceCode = :sourceCode')
            ->join('ro.individu', 'i', Join::WITH, "i.sourceCode LIKE :pattern")
            ->join('ro.role', 'r')
            ->setParameter('sourceCode', $individuSourceCode);
            ->setParameter('pattern', '%' . Etablissement::ETAB_PREFIX_SEP . $individuSourceCode);
        return $qb->getQuery()->execute();
    }