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

$in operator to recognise and obey DBRefs

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Trivial - P5
    • Resolution: Won't Fix
    • 0.9.7
    • None
    • Querying
    • None

    Description

      It would be very useful if the $in operator could recognise and obey DBRefs when querying. For example:

      > // excerpt of Account document
      > { users : [ { "$ref": "users", "$id": 11 }, { "$ref": "users", "$id": 20 }, { "$ref": "customers", "$id": 7 } ] }
      > // get account
      > var account = db.accounts.findOne( ... )
      > // get all users at once
      > db.users.find( { _id : { $in : account.users });
      

      Which returns back {user 11} and {user 20}, but not {user 7} because it's actually a "customer" collection reference.

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            digitala Phillip Oldham
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: