[CSHARP-3185] Cannot insert document with field name have dot like 'a.b' Created: 14/Aug/20  Updated: 10/May/22  Resolved: 10/May/22

Status: Closed
Project: C# Driver
Component/s: API
Affects Version/s: 2.11.0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Page Larry Assignee: James Kovacs
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongo 4.0.12, c# driver latest, net core 3.1


Issue Links:
Duplicate
Related

 Description   

await collection.InsertOneAsync(raw, new InsertOneOptions \{ BypassDocumentValidation=true });

raise with error

Unhandled exception. MongoDB.Bson.BsonSerializationException: Element name 'content.basicInfo.unitName' is not valid'



 Comments   
Comment by James Kovacs [ 10/May/22 ]

This issue was resolved by CSHARP-3399, which was released with .NET/C# driver 2.13.0.

Comment by Esha Bhargava [ 31/Aug/20 ]

1on1y4u1989@gmail.com As far as we know, there are no workarounds for this.

Comment by Milesic Milesic [ 27/Aug/20 ]

esha.bhargava Do you have any updates on this? I am passing some valid json with "." in the name to mongodb and getting the same error. Are there any known workarounds for the issue?

Comment by Esha Bhargava [ 24/Aug/20 ]

1on1y4u1989@gmail.com Thanks for reporting this bug! We'll be looking into this as a part of one of our upcoming projects and will provide you with updates as we make progress.

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