There were a number of small changes to the projection language made by this ticket:
1) Projecting on top-level dollar prefixed fields in find() is now banned, with a few exceptions ($sortKey, $recordId, for example) that are for internal use by mongos.
Example:
db.c.find({a: 1}, {$foobar: 1}) // Now illegal
|
2) Performing a projection on a field that also has the $slice expression applied to it is illegal.
Example:
db.c.find({}, {“comments”: {$slice: 1}, “comments.id”: 1}) // Illegal
|
3) $slice may not be used with positional projection on the same field.
Example:
db.c.find({"x.a": 1}, {"x.$": {$slice: -1}}) // Illegal
|
4) It is now illegal to project an empty field name