title: Symfony2 Doctrine throw NonUniqueResultException
body: <p>I have a problem throwing NonUniqueResultException in my request</p>
  
  <pre><code>public function getLastViewUpdate($view)
  {
      $qb = $this-&gt;getEntityManager()-&gt;createQueryBuilder();
  
      $result = $qb-&gt;select('vu')
          -&gt;from('EasyApp\ApplicationBundle\Entity\ViewUpdate', 'vu')
          -&gt;where('vu.view = :view')
          -&gt;orderBy('vu.date','DESC')
          -&gt;setParameter('view', $view)
          -&gt;getQuery()
          -&gt;getSingleResult();
  
      return $result;
  }
  </code></pre>
  
  <p>But I don't know realy why, I have maybe to import something, but I can't find</p>
  
  <pre><code>CRITICAL - Uncaught PHP Exception Doctrine\ORM\NonUniqueResultException: "" at /Users/antoine/Documents/projects/easyApp/application/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php line 621 
  </code></pre>
  
  <p>Thanks for your help</p>