Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Unable to exclude a field #147
I might just be missing this in the code but I'm having some difficulty figuring out how to exclude subdocuments from a result. One of the collections I'm working with can have fairly extensive array of subdocuments and the unserialize() functionality takes a fair amount of resources. I've moved the functionality into an aggregate() function (which is awesome BTW) but I would like to omit retrieving those subdocuments from my normal queries so I don't have to bear with the overhead of unserialization.
In the old MongoDB Collection I could specify
but I can't find how that can be accomplished with this library.
This will be properly documented in #144. To copy/paste an example from that PR: