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

Differences in null matching between 2.4 and 2.6

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.3
    • Component/s: Querying
    • None
    • ALL
    • Hide

      This script prints 1 in 2.4, and 0 in 2.6:

      db.foo.drop()
      db.foo.insert({ data: [] })
      db.foo.find({ 'data.item': { $in: ['abc', null] } }).count()
      
      Show
      This script prints 1 in 2.4, and 0 in 2.6: db.foo.drop() db.foo.insert({ data: [] }) db.foo.find({ 'data.item' : { $in: [ 'abc' , null ] } }).count()

      Finding null in an array field used to return documents with empty arrays and no longer does. NODE-208 describes the problem in more detail (I wrongly
      thought it was a driver or Mongoose issue).

            Assignee:
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Reporter:
            markc Mark Chapman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: