Details
-
Improvement
-
Status: Backlog
-
Minor - P4
-
Resolution: Unresolved
-
2.3.2
-
None
-
Query Optimization
-
(copied to CRM)
Description
Due to strict FieldPath validation, aggregation pipelines cannot process fields that start with a $ character (commonly found in the system.profile collection).
Steps to reproduce (copied here so code formatting works):
db.system.profile.drop();
|
db.setProfilingLevel(2);
|
db.foo.update({},{$set:{x:1}})
|
db.setProfilingLevel(0);
|
db.system.profile.aggregate([
|
{ "$match" : {"op" : "update"}},
|
{ "$project" : {"set" : "$updateobj.$set"}}
|
]);
|
Exception:
"errmsg" : "exception: FieldPath field names may not start with '$'.",
|
"code" : 16410,
|
"ok" : 0
|
Attachments
Issue Links
- is duplicated by
-
SERVER-13436 Allow creating/using dollar-sign prefixed field names
-
- Closed
-
- is related to
-
SERVER-14466 Support projecting the $id or $ref for a DBRef() field
-
- Closed
-
-
SERVER-30575 Please add escaping convention for dot and dollar signs!
-
- Backlog
-
-
SERVER-6592 improve FieldPath validation behavior
-
- Closed
-
- related to
-
SERVER-3943 $quote operator
-
- Closed
-
-
SERVER-14255 Allow storing aggregation pipelines as documents in MongoDB
-
- Backlog
-
-
SERVER-30365 How to exclude (sub)fields starting with $ in a query projection
-
- Backlog
-