[DOCS-9863] Incorrect $elemMatch query Created: 06/Feb/17  Updated: 24/Apr/17  Resolved: 24/Apr/17

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

Type: Bug Priority: Major - P3
Reporter: Sagar Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 7 years, 1 week, 2 days ago

 Description   

https://docs.mongodb.com/manual/tutorial/query-array-of-documents/#combination-of-elements-satisfies-the-criteria

The second query

should be

db.inventory.find( { "instock":

{ qty: 60, warehouse: "A" }

} )

instead of

db.inventory.find( { "instock": { $elemMatch:

{ qty: 60, warehouse: "A" }

} } )



 Comments   
Comment by Githook User [ 06/Feb/17 ]

Author:

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

Message: DOCS-9863 fix array query example
Branch: master
https://github.com/mongodb/docs/commit/13b9b09816d7ca2fdec7ad0ac3263a625c944411

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