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

BsonClassMap.LookupClassMap supports private constructors inconsistently (regression)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Serialization
    • Labels:
      None

      The user's email:

      Ello 
      After upgrading the c# mongo driver from 2.10.1 to 2.10.2, I noticed that classes that deserialised without issues suddenly stopped working, resulting in exceptions about incorrect creator maps. Has something changed with this patch?
      The class I'm deserialising has a private, parameterless constructor, and a public constructor with 4 arguments. I get the following exception since the patch:
      Creator map for class Nallian.CargoFlow.UseCase.Models.Mawb.PiecesDetail has 4 arguments, but none are configured.
      Any ideas what has gone wrong? I don't see documented changes regarding the mapping, might the change be unintended? Moving back to 2.10.1 has resolved the issue again, leading me to believe there's something with the most recent patch.
      Kind regards, Anthony

       

       

            Assignee:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Reporter:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: