Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3463

Query by multiple attributes on an Embedded Object

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 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" }

      ] } })

      Attachments

        Activity

          People

            Unassigned Unassigned
            dave@davekrupinski.com Dave Krupinski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: