Symfony2 Doctrine combining three queries
<p>I'm building a simple task planner. This is a fragment from the file TaskController.php. How can I combine these 3 queries (tasks, notcompleted, completed) to make it work? Should I use DQL?</p>

<pre><code> /**
 * Lists all task entities.
 *
 * @Route("/", name="task_index")
 * @Method("GET")
 */
public function indexAction()
{

    $em = $this-&gt;getDoctrine()-&gt;getManager();

    $tasks = $em-&gt;getRepository('TaskBundle:Task')-&gt;findByUser($this-&gt;getUser());      // all tasks of a specific user

    $notcompleted = $em-&gt;getRepository('TaskBundle:Task')-&gt;findByCompleted(false); //tasks that are not completed

    $completed = $em-&gt;getRepository('TaskBundle:Task')-&gt;findByCompleted(true); // all completed tasks


    return $this-&gt;render('task/index.html.twig', array(
        'notcompleted' =&gt; $notcompleted,
        'completed' =&gt; $completed,
        'tasks' =&gt; $tasks,
    ));


}
</code></pre>