$in operator to recognise and obey DBRefs

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Trivial - P5
    • None
    • Affects Version/s: 0.9.7
    • Component/s: Querying
    • None
    • Query
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Backlog - Query Team (Inactive)
              Reporter:
              Phillip Oldham
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: