Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4788

Ensure $exists embedded matcher returns true for null values of defined fields

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0.rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Inspection of code for the $exists matcher suggests it may treat a missing field and an existing field with a null value identially, which is not how the server $exists operator works. This ticket is to:

      Ensure there is test coverage for an $exists match on a field explicitly set to null
      Fix the matcher if necessary to have it behave identically to the server
      Test documents with arrays which satisfy $exists: true and $exists: false concurrently (for subqueries)

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: