title: "No result was found for query although at least one row was expected." Query should display records though in Symfony
body: <p>I'm trying to retrieve content using two items in the URL. Here is the php/symfony code that should do it:</p>
  
  <pre><code>    $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
  
      $repository = $this-&gt;getDoctrine()
          -&gt;getRepository('ShoutMainBundle:Content');
  
      $query = $repository-&gt;createQueryBuilder('p')
          -&gt;where('p.slug &gt; :slug')
          -&gt;andWhere('p.subtocontentid &gt; :parent')
          -&gt;setParameters(array(
                      'slug' =&gt; $slug,
                      'parent'  =&gt; $page
                  ))
          -&gt;getQuery();
  
      $content = $query-&gt;getSingleResult();
  </code></pre>
  
  <p>However, when this code is executed it returns the following error:</p>
  
  <blockquote>
    <p>No result was found for query although at least one row was expected.</p>
  </blockquote>
  
  <p>I have done some tests, and the data held in the <code>$slug</code> and <code>$page</code> variables hold the correct information. I have also tested the MySQL query and the query brings up the desired result, which confuses me further.</p>
  
  <p>Have I missed something?</p>