doctrine/mongodb — pull request #154 by malarzm (2014-02-07 15:47:40+00:00)
Title: Added areFieldsIndexed method and Tests for it

The new method is needed for https://github.com/doctrine/mongodb-odm/issues/761 and checks if all queried fields are indexed.

While writing this PR I found that prefix doesn't have to be continuous but needs first field of index included (however the index is less efficient then - http://docs.mongodb.org/manual/core/index-compound/#prefixes ). Right now I'm disallowing this (it'll be a signal to developer that collection could be better indexed) but I'm not sure if it is good approach... @jmikola what do you think about it?