[DOCS-14523] Docs should specify that _id fields cannot be regexes or undefined Created: 02/Jun/21  Updated: 30/Oct/23  Due: 04/Jun/21  Resolved: 04/Jun/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Alya Berciu Assignee: Alison Huh
Resolution: Fixed Votes: 0
Labels: docs-onboarding-candidate, docs-server-onboarding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 2 years, 28 weeks, 5 days ago
Epic Link: DOCSP-11701
Story Points: 1

 Description   

Description

From the docs:
"The _id field may contain values of any BSON data type, other than an array."

https://docs.mongodb.com/manual/core/document/#the-_id-field

However, regexes and undefined are also disallowed as values for _id. The docs should be updated to reflect this restriction. Code:
https://github.com/mongodb/mongo/blob/cf55779be0b1ed2f12c71e13e634b81007094777/src/mongo/db/ops/insert.cpp#L137-L144

 

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 23/Jul/21 ]

Author:

{'name': 'Alison Jieun Huh', 'email': 'alison.huh@mongodb.com'}

Message: DOCS-14523 update _id fields
Branch: v4.2.15
https://github.com/mongodb/docs/commit/1c5a98383c850aec29e309e7d7729ba7425cb888

Comment by Githook User [ 29/Jun/21 ]

Author:

{'name': 'Alison Jieun Huh', 'email': 'alison.huh@mongodb.com'}

Message: DOCS-14523 update _id fields
Branch: v4.0
https://github.com/mongodb/docs/commit/05e314489b933695b46ede15bea3b18ef1e1ca9c

Comment by Githook User [ 29/Jun/21 ]

Author:

{'name': 'Alison Jieun Huh', 'email': 'alison.huh@mongodb.com'}

Message: DOCS-14523 update _id fields
Branch: v4.2
https://github.com/mongodb/docs/commit/1c5a98383c850aec29e309e7d7729ba7425cb888

Comment by Githook User [ 29/Jun/21 ]

Author:

{'name': 'Alison Jieun Huh', 'email': 'alison.huh@mongodb.com'}

Message: DOCS-14523 update _id fields
Branch: v4.4
https://github.com/mongodb/docs/commit/8fe90000783096e568524d52cad9f0309efbdb89

Comment by Githook User [ 04/Jun/21 ]

Author:

{'name': 'Alison Jieun Huh', 'email': 'alison.huh@mongodb.com'}

Message: DOCS-14523 update _id fields
Branch: master
https://github.com/mongodb/docs/commit/ca70fde6e0cbbe427f975458a03689a09af6a808

Generated at Thu Feb 08 08:10:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.