title: Symfony query wrong result
body: <p>I'm using a personal request in symfony witch is:</p>
  
  <pre><code>public function findByReferenceUser($Reference, $User)
  {
      $qb = $this-&gt;createQueryBuilder('a')
          -&gt;select('a')
          -&gt;join('a.Reference', 'r')
          -&gt;where('r.id = :refId')
          -&gt;setParameter("refId", $Reference-&gt;getId())
          -&gt;join('a.User', 'u')
          -&gt;andWhere('u.id = :userId')
          -&gt;setParameter("userId", $User-&gt;getId());
  
      return $qb-&gt;getQuery()-&gt;getOneOrNullResult();
  }
  </code></pre>
  
  <p>But it doesn't work properly.
  I'm getting 3 results witch are of type NULL,NULL, Boolean. I'm using this to check it:</p>
  
  <pre><code>    $list_article = $RArticle-&gt;findByReferenceUser($reference, $panier-&gt;getUser());
      foreach ($list_article as $key =&gt; $article)
          echo gettype($article);
  </code></pre>
  
  <p>My database works, and have the right informations.
  Finnaly, this works:</p>
  
  <pre><code>    $list_article = $RArticle-&gt;findAll();
      foreach ($list_article as $key =&gt; $article)
          echo gettype($article);
  </code></pre>
  
  <p>And print object, object.</p>
  
  <p>So there is my questions: Why do I get NULL, NULL, Boolean in the first case and how do I fixe it?</p>
  
  <p>Thank you for your help! :)</p>