-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work on CSHARP-415 and CSHARP-417. BsonTypeMapper is now bidi…
…rectional with the introduction of the new MapToDotNetValue method. More careful analysis of when C# null means to ignore an item (as in functional construction) and when C# null maps to BsonNull.Value. Also looked carefully at when values cross the .NET to BsonDocument object model boundary and invoke MapToBsonValue or MapToDotNetValue as appropriate. BsonArray and BsonDocument now throw an exception on any attempt to set a value to C# null. Simplified GetDocumentId in BsonDocument to return the BsonValue unchanged. Added new BsonBinaryDataGuidGenerator for use with BsonDocument when the _id is a BsonBinaryData value holding a Guid. Changed BsonClassMapSerializer to use the new MapToDotNetValue method in the BsonTypeMapper instead of its own (now removed) version.
- Loading branch information
Robert Stam
committed
Mar 29, 2012
1 parent
08224bc
commit 89db3dd
Showing
24 changed files
with
761 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
89db3dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting this error now:
"An error occurred while deserializing the MenuItemProductDetail property of class BeerDashboard.Common.Models.MenuItem: A serialization options attribute of type BsonDictionaryOptionsAttribute cannot be used when the serializer is of type EnumerableSerializer and the item serializer is of type BsonClassMapSerializer."
Here are the two classes in question:
89db3dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a result of better error checking in the latest commits. Just remove the BsonDictionaryOptions attribute from your Prices property as it does not apply to either the array or the items.