doctrine/DoctrineMongoODMModule — pull request #104 by michaelmoussa (2014-03-19 14:20:01+00:00)
Title: DoctrinePaginator::getItems needs to $useKeys = false

Referring to [this line](https://github.com/doctrine/DoctrineMongoODMModule/blob/086e0560f8ddb81fd4e0d0de675cd3f85fe1c039/src/DoctrineMongoODMModule/Paginator/Adapter/DoctrinePaginator.php#L66).

While it adheres to the [Zend\Paginator\Adapter\AdapterInterface](https://github.com/zendframework/zf2/blob/release-2.3.0/library/Zend/Paginator/Adapter/AdapterInterface.php) by returning an `array`, in the case of Mongo the array will be keyed using MongoDB BSON ObjectIds. This makes [fetching a specific individual item impossible](https://github.com/zendframework/zf2/blob/release-2.3.0/library/Zend/Paginator/Paginator.php#L531) because `Zend\Paginator\Paginator` expects the result of `getItems()` to be keyed `0, 1, ..., n`.

This PR:
1. Adds the `false` parameter
2. Adds a unit test ensuring that the returned items are keyed appropriately.
3. Does not modify existing tests, so BC is preserved for anybody who was using them as a reference.