NoRM icon indicating copy to clipboard operation
NoRM copied to clipboard

Error when deserializing document when object does not contains this property

Open ti24horas opened this issue 14 years ago • 1 comments

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:

  1. Save an object with some properties;
  2. Retrieve the set of objects;
  3. Add some field using mongodb using $set: {SomeField: someValue}
  4. Retrieve the same set of objects. An error saying that the deserialization was failed because "SomeField" does not exist.
  5. Try to retrieve a set of objects from other collection. An OutOfMemoryException is thrown.

ti24horas avatar Sep 04 '10 12:09 ti24horas

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)

thegrubbsian avatar Jan 13 '11 22:01 thegrubbsian