Skip to content

Instantly share code, notes, and snippets.

@adsc-cloudtec
Created October 6, 2017 11:51
Show Gist options
  • Save adsc-cloudtec/c244ce1386eaf0c9be5854667aeb25fe to your computer and use it in GitHub Desktop.
Save adsc-cloudtec/c244ce1386eaf0c9be5854667aeb25fe to your computer and use it in GitHub Desktop.
$qb = $repository
->createQueryBuilder('f')
->select('f')
->join('f.address', 'a')
->join('a.locality', 'l')
->join('l.canton', 'c')
->leftJoin('f.facilities', 'fa', Join::WITH, 'fa.deleted <> 1')
->leftJoin('f.users', 'u', Join::WITH, 'u.deleted <> 1')
->leftJoin('u.roles', 'r', Join::WITH, 'r.id = :role')
->join('f.events', 'e')
->where('f.deleted <> 1');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment