Details
-
Bug
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Query Execution
-
ALL
Description
We see that the new field, which should equal the recordId, is not added to the output:
> db.newcoll.insert({a: 1}) |
WriteResult({ "nInserted" : 1 }) |
> db.newcoll.aggregate([{$addFields: {rid: {$meta: "recordId"}}}]) |
{ "_id" : ObjectId("65c281f44bb7df438ffb4d1e"), "a" : 1 } |
However this works with $project instead:
db.newcoll.aggregate([{$project:{rid: {$meta: "recordId"}} }]) |
{ "_id" : ObjectId("65c289a24bb7df438ffb4d2a"), "rid" : NumberLong(6) } |
See comments for more info.
Attachments
Issue Links
- is related to
-
SERVER-86296 Existing $recordId field hidden when showRecordId:true is used
-
- Needs Scheduling
-