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

OrderBy with an expression that doesn't resolve to a field is not supported

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.19.0
    • Affects Version/s: 2.13.2
    • Component/s: LINQ3
    • None
    • Fully Compatible

      When compiling a Queryable with an order-by expression that uses null-coalescing to default(T) errors are thrown during execution.

      I've attached a picture with one of our queries that results in an error.
      I've also attached our problem details error json.

      2022-11-12: See comment below for a minimal reproduction.

        1. image-2021-11-11-10-14-04-081.png
          image-2021-11-11-10-14-04-081.png
          55 kB
        2. exception.json
          17 kB

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            info@rickvanlieshout.com Rick van Lieshout
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: