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

Support nested queries in $elemMatch

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Query
    • None

      PR: https://github.com/mongodb/mongoid/pull/4656

      The original issue (that this PR fixes) was that nested conditionals (like :$or) inside of a :$elemMatch would raise NoMethodError: undefined method `_matches?' for

      {"a"=>1, "b"=>1}

      :Hash since a Hash value would get evaluated internally inside the :$elemMatch execution.

            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: