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

"Query" as a property name is allowed, however querying on it is not possible

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      If you have a document with the property name "query" in it, queries with $ne will not work.
      Example:

      db.coll.insert({ query: 'foo' })'
      db.coll.findOne({ query: { $ne: 'bar' } });
      

      Exact equality searches work:

      db.coll.findOne({ query: 'foo' });
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            davebarbarian24 Dave Workman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: