-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.5.0
-
Component/s: None
-
None
-
🔵 Done
-
Dotnet Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Summary
Hi,
We’ve mapped the "_t" field to a class property in our model. However, it seems that version 3.5.0 of the MongoDB C# driver does not allow this.
Is there any workaround for this limitation? We’d like to avoid introducing an additional property or performing major code refactoring if possible.
Thanks!
Â
How to Reproduce
   [BsonElement("_t")]     public string EnvironmentType { get; set; }
Â
Additional Background
MongoDB Atlas 8.0
- is related to
-
CSHARP-4040 Serialization ignores discriminator field when checking for duplicate field names
-
- Closed
-
- related to
-
CSHARP-5752 (Enquiry) working discriminator element as a property in class
-
- Backlog
-