doctrine/mongodb-odm — pull request #714 by nord-ua (2013-12-03 14:28:10+00:00)
Title: DocumentManager flush can save MongoCursor

If I want search for documents, update them and save all received documents I should call iterator_to_array before saving.
````
$eventUsers = $this->getRepositoryEventUser()->getUsersForEvent($id, $user_ids);
$eventUsers = iterator_to_array($eventUsers); // <-- Have explicitly use this

foreach ($eventUsers as $eu)
$eu->setStatus(EventUser::STATUS_CONFIRMED);
$this->getDocumentManager()->flush($eventUsers);
````

With this changes Cursor can be saved with no extra code.