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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 0.9.9
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • 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 Horowitz (Inactive)
              Reporter:
              Phillip Oldham
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: