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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None
    • ALL

    Description

      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' });
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: