[DOCS-12672] Wrong collection name is specified in the example for $where usage Created: 02/May/19  Updated: 30/Oct/23  Resolved: 02/May/19

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

Type: Bug Priority: Minor - P4
Reporter: Dmitry Ryabtsev Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 4 years, 40 weeks, 6 days ago
Epic Link: DOCSP-1769

 Description   

Description

In the example here we say:

Consider the following documents in the users collection:

However, the following code that shows how $where can be used is using collection name foo instead:

db.foo.find( { $where: function() {
   return (hex_md5(this.name) == "9b53e667f30cd329dca1ec9e6a83e994")
} } );

It should be instead:

db.users.find( { $where: function() {
   return (hex_md5(this.name) == "9b53e667f30cd329dca1ec9e6a83e994")
} } );

Scope of changes

Impact to Other Docs

MVP (Work and Date)

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



 Comments   
Comment by Githook User [ 02/May/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-12672: fix collection name in $where example
Branch: v3.6
https://github.com/mongodb/docs/commit/fce8ffe95a61c3690ff1f93e9ee2713307078249

Comment by Githook User [ 02/May/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-12672: fix collection name in $where example
Branch: v4.0
https://github.com/mongodb/docs/commit/263a5ddff48465afddafd436306b6e07f4a76b8c

Comment by Githook User [ 02/May/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-12672: fix collection name in $where example
Branch: master
https://github.com/mongodb/docs/commit/3d888b23d2cb1a31a9f1430531a8e26ddccbabf1

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