[CSHARP-1534] Add a new constructor that take "baseClassMap" in BsonClassMap<TClass> Created: 14/Jan/16  Updated: 09/Nov/22  Resolved: 09/Nov/22

Status: Closed
Project: C# Driver
Component/s: BSON, Serialization
Affects Version/s: 2.2
Fix Version/s: 2.0.1

Type: Improvement Priority: Major - P3
Reporter: Mirko Da Corte Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CSHARP-1253 Cannot deserialize inherited members ... Closed
Backwards Compatibility: Fully Compatible

 Description   

I need to set a custom BaseClassMap creating a new ClassMap, but i need also to initialize a generic instance. BaseClassMap proeprty is accessibile only in get from BsonClassMap, but I'd like to set that value when I initialize a new BsonClassMap<TClass>.
At now I'm injecting a value with Reflection, but it's not a safe solution.



 Comments   
Comment by James Kovacs [ 09/Nov/22 ]

This was fixed in the context of version 2.0.1. BsonClassMap has a constructor overload that accepts a baseClassMap.

Comment by Mirko Da Corte [ 10/Jul/20 ]

Hi, still waiting for this. Please!

Comment by Mirko Da Corte [ 28/Jul/17 ]

Hi, any news on this? I'd like if you could add on a next version, it is not a difficult update. Thank you.

Comment by Craig Wilson [ 19/Jan/16 ]

Hi Mirko,

That's a good observation. We'll add this into our planning buckets.

Craig

Generated at Wed Feb 07 21:39:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.