title: Doctrine MongoDB Bundle: Cursor toArray() Error When "_id" is an Array
body: <p>Resulting from a MapReduce, I have a MongoDb collection that has the following structure:</p>
  
  <pre><code>{ "_id" : { "id" : NumberLong(1), "date" : "04-26-2012" }, "value" : { "count" : 100 } }
  </code></pre>
  
  <p>In my controller I am doing the following to return an array to display the results:</p>
  
  <pre><code>$mongoDb         = $mongo-&gt;selectDatabase($dbname);        
  $mongoCollection = $mongoDb-&gt;selectCollection($collname);
  $qb              = $mongoCollection-&gt;createQueryBuilder(); 
  $qb              = $qb-&gt;find();        
  $resultCursor    = $qb-&gt;getQuery()-&gt;execute();
                                    -&gt;limit(10);
  $resultArray     = $resultCursor  -&gt;toArray();
  </code></pre>
  
  <p>However, I get an exception: "Notice: Array to string conversion in vendor/doctrine-mongodb/lib/Doctrine/MongoDB/Cursor.php line 154"</p>
  
  <p>Below is line 154 of Cursor.php. Does MongoCursor::key not handle "_id" as an Array?</p>
  
  <pre><code>/** @proxy */
  public function key()
  {
      return $this-&gt;mongoCursor-&gt;key();
  }
  </code></pre>