doctrine/mongodb-odm — pull request #584 by bakura10 (2013-05-16 20:50:33+00:00)
Title: Bring initial Criteria support

Hi,

This PR brings initial support for the Criteria API introduced in Doctrine 2.3. Currently, only the repository is made. If this seems good I'll write tests.

To be complete and in par with ORM, PersistentCollection needs to implement the Selectable API, but this is much harder to do (I've been thinking about using some kind of visitor for cursor but that's not that easy). If anyone has an idea, I'd be glad to hear about it.

There is also a TODO for the Repository. The problem by returning an ArrayCollection is for things like this (https://github.com/doctrine/DoctrineModule/blob/master/src/DoctrineModule/Paginator/Adapter/Selectable.php#L75). Ideally the data should be wrapped and initialized on demand, so that we can perform an efficient count.

Thanks