[CSHARP-215] Save fails with duplicate key exception when updating an existing document and _id is a string internally represented as an ObjectId in the database Created: 28/Apr/11  Updated: 28/Apr/11  Resolved: 28/Apr/11

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

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


 Description   

To reproduce use this class:

public class C

{ [BsonRepresentation(BsonType.ObjectId)] public string Id; public int X; }

and these statements:

var doc = new C

{ X = 1 }

;
collection.Save(doc);

doc.X = 2;
collection.Save(doc);



 Comments   
Comment by Robert Stam [ 28/Apr/11 ]

Fixed.

Comment by Robert Stam [ 28/Apr/11 ]

Was first created in the FREE project by mistake. Sorry.

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