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

Projection of constant with no known serializer is not supported

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.15.1
    • Affects Version/s: None
    • Component/s: LINQ3, Serialization
    • Labels:
      None
    • Fully Compatible

      Summary

      The following expression (expressions not referencing the input object) in LINQ3

      var query = coll.Aggregate().Project(x => new { IsTrue = true });

      throws

      Unhandled exception. System.InvalidOperationException: Cannot find serializer for { IsTrue = True }

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            boris.dogadov@mongodb.com Boris Dogadov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: