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

Auto Mapping of private properties stops working after 2.10

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: 2.10.1, 2.15.0
    • Component/s: None
    • Labels:
      None

      Summary

      Mapping classes with private setters fails after 2.10
      I note this was mentioned a few times but the only ticket I can find relating to this is marked as "gone away"
      https://jira.mongodb.org/browse/CSHARP-2995?filter=-5&jql=project%20%3D%20CSHARP%20AND%20text%20~%20%22none%20are%20configured%22%20order%20by%20priority%20DESC%2Cupdated%20DESC

      There's also a web post on the same issue
      https://www.codewrecks.com/post/general/error-in-mongodb-serializer/

      And an ignored forum post on the mongo forum https://www.mongodb.com/community/forums/t/mapping-a-type-with-parameterised-constructor-c-driver-v2-10-2/11856

      I'm migrating a project from 2.9x that uses Mongo as part of NEventstore; Switching from 2.9 to 2.10.1/2.15 results in all the mapping of value objects on aggregates (all of which have private setters) failing.
      There are no breaking changes mentioned between these versions, yet clearly it breaks, and is not isolated to our usage so I'm trying to work out how best to fix this up.

      Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).

      Tested on 2.10 to present release 2.15

            Assignee:
            Unassigned Unassigned
            Reporter:
            chris.mckee@ivendi.com Chris McKee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: