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

Cannot find documentation on differences between LINQ2 and LINQ3 providers

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.19.1
    • Component/s: LINQ3
    • Labels:
      None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Summary

      The latest MongoDB.Driver for C# switched the default LINQ Provider from 2 to 3 but is severely lacking in the "Breaking Changes" section of the release notes. We updated our project to use the latest driver, addressed the issues called out in breaking changes such as the ObjectSerializer changes.

      We then began seeing errors like the following:
      "ExpressionNotSupportedException: ... because negative indexes are not valid. To use the positional operator $ use FirstMatchingElement instead of an index value of -1."

       

      Great.. so clearly based on the error message, this is a "known" change but I had to do some web searching just to find https://jira.mongodb.org/browse/CSHARP-4079 which nonchalantly says something like "Oh, we're going to be replacing these 3 things with these 3 extension methods" and closes the issue. That's all well and good except where is this called out in the documentation or more importantly the breaking changes section? Where is the page that documents what to look out for or change when moving from LINQ2 to LINQ3 provider? If it exists, that's great but it also needs to be more discoverable and should be listed in the breaking changes section of the 2.19.0 driver release. If it doesn't exist, please create one because I have no idea what else is going to bite me in this code base due to undocumented changes (at least undocumented from the standpoint of I couldn't find anything).

       

      I will try the MongoDB Analyzer now as I was not previously aware of this and it is not called out in the release notes for 2.19.x.

       

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            ttutko@outlook.com Thomas Tutko
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: