Dear MongoDB

Dear MongoDB,

I would like to use the positional operators you have for updates, ala ‘user.$.name’, in the field selectors for queries, ala find({“user.name”: “Matt”},{“user.$.address”}) such that I can see only the fields of that sub-document/sub-object in my return data instead of having to return “user.address” which may have thousands of results, and then filter it in code before returning it the application.

Yes, I know I could have a different document model, but I don’t always get to pick that. This would be awesome.

Thank you for all the fun,
M@

This entry was posted in Architecture, Coding, Linuxy, Work and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *