[CSHARP-2622] IdGenerator not working for inserts after using oftype on collection Created: 29/May/19  Updated: 11/Oct/19  Resolved: 11/Oct/19

Status: Closed
Project: C# Driver
Component/s: Serialization
Affects Version/s: 2.8.1
Fix Version/s: 2.9.3

Type: Bug Priority: Major - P3
Reporter: boppbo Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 1809, Azure CosmosDB Emulator 2.1.3
Reproduced with both dotnet core 2.2 / 3.0 Preview 5


Attachments: Text File Program.cs    

 Description   

Id generator not working when using oftype on collection to insert document. See attached example. It will insert Guid.Empty. After commenting out oftype (line 14) it works.

 

Is there a known workaround?



 Comments   
Comment by Githook User [ 11/Oct/19 ]

Author:

{'username': 'rstam', 'email': 'robert@robertstam.org', 'name': 'rstam'}

Message: CSHARP-2622: IdGenerator not working for inserts after using oftype on collection.
Branch: v2.9.x
https://github.com/mongodb/mongo-csharp-driver/commit/f5b9db9bbfd9de95686e4fb619ef948a925c4d76

Comment by Githook User [ 11/Oct/19 ]

Author:

{'name': 'rstam', 'username': 'rstam', 'email': 'robert@robertstam.org'}

Message: CSHARP-2622: IdGenerator not working for inserts after using oftype on collection.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/604c1d38a5e17afe427b6b696f790162c8e8c453

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