NoRM
NoRM copied to clipboard
Error when deserializing document when object does not contains this property
When a field is added to the document and the object does not have this property, first, an OutOfmemoryException is thrown, then various errors occurs in other object deserialization that is not related with the first. The workaround is remove the field from mongodb, then reset the pooled connections. How to reproduce:
- Save an object with some properties;
- Retrieve the set of objects;
- Add some field using mongodb using $set: {SomeField: someValue}
- Retrieve the same set of objects. An error saying that the deserialization was failed because "SomeField" does not exist.
- Try to retrieve a set of objects from other collection. An OutOfMemoryException is thrown.
This is actually not specifically related to adding and removing fields. For me it appears to be a concurrency issue. There's a thread on the Google Group about this (http://groups.google.com/group/norm-mongodb/browse_thread/thread/af03b3eb1d016309)