[CSHARP-198] Save method throws exception if Id is a composite class Created: 11/Apr/11 Updated: 02/Apr/15 Resolved: 12/Apr/11 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.0 |
| 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 |
|
If the type of the Id property of a class is a composite class then the Save method throws an exception. See sample code at: http://groups.google.com/group/mongodb-user/browse_thread/thread/82c68a5dd9d6fe2f# |
| Comments |
| Comment by Robert Stam [ 12/Apr/11 ] |
|
Save now uses a BsonDocumentWrapper for the Id if it can't be mapped to a BsonValue. Save also handles polymorphic Ids (although I expect polymorphic Ids are quite rare). |