Query by multiple attributes on an Embedded Object

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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" }

      ] } })

            Assignee:
            Unassigned
            Reporter:
            Dave Krupinski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: