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

Fix how Selector.multi_selection? handles symbols

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.2.1
    • Component/s: Query
    • Labels:
      None

      Selector.multi_selection? returns incorrectly for the symbol equivalents of "$and" and "$nor" (i.e., :$and and :$nor). This incorrect behavior breaks Selector.merge!(), which is a public Mongoid API exposed to users.

      The PR is already ready to be reviewed/merged: https://github.com/mongodb/mongoid/pull/4981

      The PR:

      • Fixes this issue.
      • Provides a unit test that repros the problem in the old code, and now passes with the new code.
      • Provides a user-level reproduction of the broken behavior using public Mongoid APIs.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            dalton.black@braze.com Dalton Black
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: