[DOCS-9190] possible bug when trying to query a field with value of 0 Created: 23/Oct/16  Updated: 24/Oct/16  Resolved: 24/Oct/16

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

Type: Bug Priority: Trivial - P5
Reporter: Docs Collector User (Inactive) Assignee: Allison Reinheimer Moore
Resolution: Cannot Reproduce Votes: 0
Labels: bite-sized, collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  • Ubuntu 16.04 LTS (homestead vm)
  • php70-mongodb 1.2.0alpha1
  • mongodb v3.2.10

Location: https://docs.mongodb.com/manual/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
Referrer: https://docs.mongodb.com/
Screen Resolution: 1920 x 1200


Participants:
Days since reply: 7 years, 16 weeks, 2 days ago
Story Points: 0.25

 Description   

i have a field in my collection call `approved` with type of `int` ,

when i try to query it like

```
db.articles.find(

{approved: 0}

)
```

gives nothing but

```
db.articles.find(

{approved: 1}

)
```
works without any issues.



 Comments   
Comment by Allison Reinheimer Moore [ 24/Oct/16 ]

Hello!

Unfortunately, I can't reproduce your issue on MongoDB 3.2. Here's my shell output:

switched to db test
> db.articles.insert({"foo":"bar","approved":0})
WriteResult({ "nInserted" : 1 })
> db.articles.insert({"foo":"bar","approved":1})
WriteResult({ "nInserted" : 1 })
> db.articles.find({approved: 0})
{ "_id" : ObjectId("580e015e94b3e558927c6a1c"), "foo" : "bar", "approved" : 0 }

Since the Documentation Jira project is specifically for issues with the documentation, and this does not appear to be a docs issue, I'd suggest posting to the mongodb-user Google Group for help.

Cheers,
Allison

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