title: Symfony2 Doctrine Querybuilder select all
body: <p>I'm currently working on a Service in SF2 that queries the database with the QueryBuilder using a class variable set with a repository-specific QueryBuilder in the constructor of this Service. 
  Which means i would like to make use of this set QueryBuilder as much as possible for neater code and a clean feeling using it. </p>
  
  <p>I want to avoid creating a query on the EntityManager, but instead solely query using this predefined Querybuilder. </p>
  
  <p>I'm looking for something that would look/work like the following:</p>
  
  <pre><code>$query = $this-&gt;fooRepository-&gt;createQueryBuilder('f')-&gt;select('*');
  return $query-&gt;getResult(Query::HYDRATE_ARRAY);
  </code></pre>
  
  <p>The above would (if it worked) return all the foo in the database as far as i know..</p>
  
  <p>If you think i'm being stupid and should do something different in regard to the predefined QueryBuilders or just use the:</p>
  
  <pre><code>createQuery()
  </code></pre>
  
  <p>method because it simply isn't good practice or impossible, don't hesitate to tell me.</p>
  
  <p>Thanks!</p>