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

Unable to specify member map for generic base class.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • 2.2
    • BSON, Serialization
    • None

    Description

      If you have a generic base class in a contracts library that doesn't have a dependency on Mongo.

      public Thing<T>
      {
        public T Value { get; set; }
        public Dictionary<string, object> Properties { get; set; }
      }
      

      Using the current BsonClassMap there does not appear to be a way to indicate that Properties should be used as the ExtraElements attribute without checking that the type has been mapped on each call and creating a mapping then.

      Attachments

        Activity

          People

            james.kovacs@mongodb.com James Kovacs
            veleek Benjamin Randall
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: