[DOCS-5580] Comment on: "manual/reference/method/db.collection.findOne.txt" Created: 08/Jun/15  Updated: 03/Nov/17  Resolved: 08/Jun/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: http://docs.mongodb.org/manual/reference/method/db.collection.findOne/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36
Referrer: http://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/
Screen Resolution: 1600 x 1200
repo: docs
source: reference/method/db.collection.findOne


Participants:
Days since reply: 8 years, 36 weeks, 2 days ago

 Description   

I can't comment on pages I found useful so I had to mark this one as not useful to report a bug 2 pages back. I think the page was .../db.collection.find. Anyway, in the line:

db.bios.find( { },

{ name: 1, contribs: 1 }

)

there should be quotes around the word "name"



 Comments   
Comment by Kay Kim (Inactive) [ 08/Jun/15 ]

The mongo shell allows for field names with/without the quotes unless using dot notation, which requires the quotes around. Concur that it is an inconsistency within our manual (similar to the lack of semicolons).

Some drivers/languages require the quotes, of course.

Generated at Thu Feb 08 07:50:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.