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

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

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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 Eliot Horowitz (Inactive)
            Reporter:
            sandstrom sandstrom
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: