Advertisement
Guest User

doctrine bug

a guest
Dec 29th, 2011
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. $qb = $em->createQueryBuilder()
  2.     ->select('t, c, p')
  3.     ->from('Task', 't')
  4.     ->leftJoin('t.children', 'c')
  5.     ->leftJoin('t.parent', 'p')
  6.     ->orderBy('t.root, t.lft')
  7. ;
  8.  
  9. foreach( $qb->getQuery()->getResult() as $task)
  10. {
  11.     $task->getChildren()->count();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement