title: doctrine querybuilder limit and offset
body: <p>i'm a symfony beginner and i want to make a blog with the framework. i use repository to get home articles with this method :</p>
  
  <pre><code>public function getHomeArticles($offset = null, $limit = null)
  {
      $qb = $this-&gt;createQueryBuilder('a')
                 -&gt;leftJoin('a.comments', 'c')
                 -&gt;addSelect('c')
                 -&gt;addOrderBy('a.created', 'DESC');
  
  
      if (false === is_null($offset))
          $qb-&gt;setFirstResult($offset);
  
      if (false === is_null($limit))
          $qb-&gt;setMaxResults($limit);
  
      return $qb-&gt;getQuery()
                -&gt;getResult();
  }
  </code></pre>
  
  <p>so in my database i have 10 articles. In my BlogController i use :</p>
  
  <pre><code>$blog = $em-&gt;getRepository('TestBlogBundle:Article')
                  -&gt;getHomeArticles(3,4);
  </code></pre>
  
  <p>With this i want 4 articles. But in return i also have one article.</p>
  
  <p>What is the problem?</p>