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

$Not with non-existing fields change in 2.6 from 2.4

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
    • ALL

      //2.4
      db.test.insert({_id:0})
      db.test.find({a:{$not: {$lt: null}}})
      //nothing returned

      //2.6
      db.test.insert({_id:0})
      db.test.find({a:{$not: {$lt: null}}})
      {_id: 0}

      Note that this works with $lt:1 or any other value, not just null

            Assignee:
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Reporter:
            andrew.emil@10gen.com Andrew Emil (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: