title: Limiting a doctrine query with a fetch-joined collection?
body: <p>I have a doctrine query that returns blog posts and their comments:</p>
  
  <pre><code>SELECT b, c FROM BlogPost b LEFT JOIN b.comments c
  </code></pre>
  
  <p>I would like to limit the results to 10 blog posts. According to the DQL documentation, <code>setMaxResults()</code> doesn't work correctly on queries that fetch-join a collection (comments in this case):</p>
  
  <blockquote>
    <p>If your query contains a fetch-joined
    collection specifying the result limit
    methods are not working as you would
    expect. Set Max Results restricts the
    number of database result rows,
    however in the case of fetch-joined
    collections one root entity might
    appear in many rows, effectively
    hydrating less than the specified
    number of results.</p>
  </blockquote>
  
  <p>How would I properly limit a doctrine query that contains a fetch-joined collection (in this case, limit the results to 10 blog posts)?</p>