Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
None
Description
Currently the querying options on embedded objects is limited to either a single attribute in an embedded object, or else finding against the entire contents of the embedded object.
It would be extremely useful to be able to do a narrow query that will only match if all the parameters match a single (or more) row in the embedded object.
Syntactically I could see dot notation down to the field that contains the embedded objects, and then reused of $and operator:
db.collection.find({ embeds : { $and : [
{ first_name : "Leslie" },
{ last_name : "Nielsen" }] } })