title: Doctrine query with nullable/optional join
body: <p>I got a method on my repository class to get me <code>Article</code> with their join (category, image ...) and not every <code>Article</code> have categories or image, what don't give me back all expected result, cause my current repository function return only <code>Article</code> who have <code>Categories</code> and <code>Image</code> not null and just ignore what having null value.</p>
  
  <p>My <code>Article</code> entity have the following relationship.</p>
  
  <pre><code> /**
   * @ORM\ManyToMany(targetEntity="App\ArticleBundle\Entity\Category", cascade={"persist"})
   */
  private $categories;
  
  /**
   * @ORM\ManyToOne(targetEntity="App\ArticleBundle\Entity\Image", cascade={"persist"})
   * 
   */
  private $image;
  </code></pre>
  
  <p>And this is my repository function</p>
  
  <pre><code>public function getArticle($id)
  {
      $qb = $this-&gt;createQueryBuilder('a')
      -&gt;where('a.id = :theId')
          -&gt;setParameter('theId', $id)
      -&gt;join('a.author', 'auth')
          -&gt;addSelect('auth')
      -&gt;join('a.categories', 'cat')
          -&gt;addSelect('cat')
      -&gt;join('a.image', 'img')
          -&gt;addSelect('img');
  
      return $qb-&gt;getQuery()-&gt;getOneOrNullResult();
  }
  </code></pre>
  
  <p>Now I want to know if I can get <code>Article</code> which have <code>categories</code>, <code>image</code> or not in one query with the join. I want to say when using the Doctrine lazy loading (by avoid the join in the query) I get the expected result.</p>