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

Add tests for condition being a matching array in $eq embedded matcher

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 7.2.0.rc1
    • Affects Version/s: None
    • Component/s: Query
    • Labels:
      None

      MongoDB server, when using $eq and the argument is an array, matches two ways:

      • argument array is the same as any of the field values
      • argument array is an element of the field value (field value is a multi-dimensional array)

      According to my reading of the code, Mongoid always performs array equality check when both matcher and matchee are an array, thus not matching second case that the server supports.

            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: