[DOCS-10885] Change collection method syntax Created: 10/Oct/17  Updated: 30/Oct/23  Resolved: 02/Nov/17

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

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: collector-298ba4e7, docs-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Participants:
Days since reply: 6 years, 14 weeks, 6 days ago

 Description   

"db.collection.count() " instead of "db.COLLECTION_NAME.count() " is misleading & cause problems

Wrong command

show dbs
use database_name ( ex : myproject)
db.collection.count() > gives 0 , wrong result

correct command

show dbs
use database_name ( ex : myproject)
show collections
db.COLLECTION_NAME.count()

I can see that a lot of people have face the same issue as me by looking at the number of question on same issue on stackoverflow .
I posted a similar que :
https://stackoverflow.com/questions/46654878/mongoose-save-function-is-not-persisting-in-local-mongodb



 Comments   
Comment by Nicholas Larew [ 02/Nov/17 ]

Closing this ticket as "works as designed."

The examples on each method page clearly show proper use.
The current implementation follows our standard style for denoting methods.
Using `db.COLLECTION_NAME.METHOD()` syntax would lead to inconsistency across our documentation for drivers and other products.

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