This is an example.
$em=$this->getDoctrine()->getRepository('AcmeUserBundle:User'); $query=$em->createQueryBuilder('u') ->where('u.roles like :role') ->setParameter('role', '%"ROLE_PROSPECTOR"%') ->getQuery(); $users = $query->getResult();
$em=$this->getDoctrine()->getRepository('AcmeUserBundle:User'); $query=$em->createQueryBuilder('u') ->where('u.roles like :role') ->setParameter('role', '%"ROLE_PROSPECTOR"%') ->getQuery(); $users = $query->getResult();
评论
发表评论