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

DBRefs - "invalid $operator: $id", sometimes.

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 0.9.9
    • None

      > use test
      switched to db test
      > db.main.find()
      {"_id" : "b45c046c-c502-11dd-b0b6-001d7dc91168" , "_ref" : {"$ref" : "test" , "$id" : "b44ab2b6-c502-11dd-b0b6-001d7dc91168"}}
      > db.main.find({"_ref":

      {'$id' : "b44ab2b6-c502-11dd-b0b6-001d7dc91168", '$ref': 'test'}

      })
      error:

      {"$err" : "invalid $operator: $id"}

      > db.main.find({"_ref":

      {"$ref" : "test" , "$id" : "b44ab2b6-c502-11dd-b0b6-001d7dc91168"}

      })
      {"_id" : "b45c046c-c502-11dd-b0b6-001d7dc91168" , "_ref" : {"$ref" : "test" , "$id" : "b44ab2b6-c502-11dd-b0b6-001d7dc91168"}}

      Since objects/dictionaries/associative arrays are unordered, one would expect the first example to work.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            digitala Phillip Oldham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: