$elemMatch not working as expected with $or

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • ALL
    • Hide

      Available in the Linked Ticket in the comments

      Show
      Available in the Linked Ticket in the comments
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Using the .NET/C# Driver, the following MQL (as seen in the linked ticket) does not work: 

      { Roles : { $elemMatch : { $or : [{ $eq : 1 }, { $eq : 2 }] } } } 

      Any suggestions for what the Driver should be doing instead?

      { Roles : { $in : [1, 2] } }

       will work for this specific case but we want to support it using LINQ (LINQ is a general purpose translator and the arguments to $or might not be $eq comparisons.)

              Assignee:
              Unassigned
              Reporter:
              Rishit Bhatia
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: