Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-606

LINQ Is predicate does not work for properties

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.7
    • Affects Version/s: 1.5, 1.6
    • Component/s: None
    • Minor Change

      The LINQ driver's type tests when used on a member property in a predicate do not include the member name.

      e.g.

      Unable to find source-code formatter for language: csharp. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      from t in collection.AsQueryable() where t.Prop is B select t
      

      translates to

      { "_t" : "B" } 
      

      instead of

      { "Prop._t" : "B" } 
      

      A Similar problem exists for type comparisons using typeof.

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            andy clapham Andy Clapham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: