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

$and and $nin does not work well together

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 2.4.9
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Run the query above. Query should not return any document. It returns a document if _id exists.

      Show
      Run the query above. Query should not return any document. It returns a document if _id exists.

      Description

      The following query still returns a document, despite logically it should not:

      { '$and': [

      { _id: 'qSEhNMGPv38AY4gCR' }

      , {_in: { '$nin': [ 'qSEhNMGPv38AY4gCR' ] }}] }

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mitar Mitar
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: