Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
In the JS SDK Parse.Query.aggregate()
works really well in runtime, but the fact that stage names differ from the built-in MongoDB’s by the $
symbol and using objectId
instead of _id
represents an issue for compatibility, for example, when importing/exporting/debugging a pipeline in other tools like MongoCompass.
Feature / Enhancement Description
Parse.Query.aggregate()
should support pipeline stage names in the same format as in mongodb so pipelines can be copy-pasted from/to other tools (mongo shell, mongo compass, etc), without having to edit each stage's name.
Example Use Case
Either of these parameters should be valid:
// current Parse SDK format
Parse.Query.aggregate({ match: { objectId: '1234' } });
// mongodb's standard format
Parse.Query.aggregate({ $match: { _id: '1234' } });
Alternatives / Workarounds
A current workaround is to develop/test/debug pipelines in MongoDB Compass (or your preferred tool) and then copy the whole pipeline into your js code and edit all stage names (only top-level, btw) by adding a preceding $
and substituting _id
for objectId
on top-level stages (2nd-level stages and deeper are already using _id
).