[SERVER-39521] ObjectWrapper::toBSON() may omit _id field Created: 11/Feb/19  Updated: 29/Oct/23  Resolved: 26/Feb/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.1.9

Type: Bug Priority: Major - P3
Reporter: Justin Seyster Assignee: Mira Carey
Resolution: Fixed Votes: 0
Labels: afz
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2019-03-11
Participants:
Linked BF Score: 21

 Description   

We incorrectly checked for _id with alreadyHasOwnField, instead of hasOwnField, which caused us to miss _id fields set from c++.

This changes how we do that check, and adds object wrapper methods for both types of access



 Comments   
Comment by Githook User [ 26/Feb/19 ]

Author:

{'name': 'Jason Carey', 'email': 'jcarey@argv.me', 'username': 'hanumantmk'}

Message: SERVER-39521 Don't skip _id in ObjWrapper::toBSON

We incorrectly checked for _id with alreadyHasOwnField, instead of
hasOwnField, which caused us to miss _id fields set from c++.
Branch: master
https://github.com/mongodb/mongo/commit/3b2e02cb27fd4e1814066ebfe7e67699ffbe4581

Generated at Thu Feb 08 04:52:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.