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

XMLWordPrintableJSON

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

      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
              Reporter:
              Dave Workman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: