title: Fetching doctrine nested set with one query
body: <p>I am looking a way to fetch a nested set in one db query.</p>
  
  <pre><code>schema.yml
  Category:
    actAs:
      NestedSet:
        hasManyRoots: true
        rootColumnName: root_id
    columns:
      name: string(255)
  
  $categories = Doctrine::getTable('Category')-&gt;getTree();
  
  //SELECT * FROM category c ORDER BY c.root_id asc, c.lft asc
  
  foreach ($categories as $cat)
  {
    $cat-&gt;getNode(); 
  //SELECT * FROM category c WHERE ((c.lft &gt; '1' AND c.rgt &lt; '8') AND c.root_id = '1') ORDER BY c.lft asc
  }
  </code></pre>
  
  <p>So, in total I get as many queries as categories, which is bad. Any ideas?</p>