Symfony内心加入学说

时间:2014-11-20 11:29:30

标签: php symfony doctrine

我想使用doctrine方法翻译跟随查询

    select * from scheda s join statoscheda ss on ss.id = s.idStatoScheda 

我已经尝试了这个但是没有工作:

    $em = $this->getDoctrine()->getManager();

    $entities = $em
        ->getRepository('SchedaBundle:Scheda')
        ->createQueryBuilder('s')
        ->join('s.StatoScheda', 'ss')
        ->getQuery()
        ->getResult();

0 个答案:

没有答案