Object properties with $ doesn't work without quotes in find()

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the mongo console using $ in property names work, eg:

      > var a = {}
      > a
      {}
      > a.$ref = "test"
      test
      > a.$ref
      test

      However, in MongoDB when using this in the find method I need to quote the property name for things to work.

      db.foo.find(

      {"a.$ref":"test"}

      )

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            sandstrom
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: