Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My fix related to issue #43 (fixed bug) #61

Closed
wants to merge 3 commits into from
Closed

My fix related to issue #43 (fixed bug) #61

wants to merge 3 commits into from

Conversation

joelvh
Copy link

@joelvh joelvh commented Jan 31, 2011

I opted to let the deserializer continue deserializing the data structure retrieved from the database even if it was not correct according to the .NET class structure. The deserializer then throws an error when there is a Type mismatch.

…excerption. Changed it to a finally block instead, and check for negative index.

- Because NoRM does not do enough type-checking when using update commands on MongoDB, the data stored in the database can become incompatible with the .NET class being deserialied to.  This is primarily the case with arrays.  An array such as List<string> may be saved in the database, then a value such as an array rather than a string can be inserted on an update.  This will make the nested array stored in the database not deserialize to a list of strings.  I updated the array deserialization routine to compensate for nested arrays, which lets the deserializer throw an exception when adding an element of type Array to a list of type List<string>.
… null and that there are more than 0 bytes left.
…(Type) to serialize the type information if MongoConfigurationMap.UseAsDiscriminator() was used instead of the MongoDiscriminatedAttribute.
@atheken
Copy link
Owner

atheken commented Feb 5, 2011

thanks, will review and merge.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants