
doctrine bug
By: a guest on
Dec 29th, 2011 | syntax:
PHP | size: 0.25 KB | hits: 27 | expires: Never
$qb = $em->createQueryBuilder()
->select('t, c, p')
->from('Task', 't')
->leftJoin('t.children', 'c')
->leftJoin('t.parent', 'p')
->orderBy('t.root, t.lft')
;
foreach( $qb->getQuery()->getResult() as $task)
{
$task->getChildren()->count();
}