title: Return array, not object from Doctrine query - Symfony2
body: <p>I'm using this:</p>
  
  <pre><code>$this-&gt;getDoctrine()-&gt;getRepository('MyBundle:MyEntity')-&gt;findAll(array(), Query::HYDRATE_ARRAY);
  </code></pre>
  
  <p>I thought that should ensure it returns an array of an array, but it still returns an array of objects.</p>
  
  <p>I need the whole result returned as an array of an array so I can do this kind of thing (silly example, but it explains what I mean):</p>
  
  <pre><code>&lt;?php
  $result = $this-&gt;getDoctrine()-&gt;getRepository('MyBundle:MyEntity')-&gt;findAll('return-an-array');
  ?&gt;    
  This is the age of the person at the 5th record: &lt;?php echo $result[4]['age']; ?&gt;
  </code></pre>