LINQ3: Contains should use $elemMatch

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.14.0
    • Affects Version/s: None
    • Component/s: LINQ3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Translate:

      document.A.Contains(c) 

      to:

      { A : { $elemMatch : { $eq : c } } } 

      instead of:

      { A : c } 

      To prevent certain transformations that apply to `{ A : c }` (but not for this `Contains` case) from being applied.

      During final rendering (when no further transformations to the AST will occur) the first from can be rendered as the second form.

              Assignee:
              Robert Stam
              Reporter:
              Robert Stam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: