ServiceStack/ServiceStack.OrmLite — pull request #289 by sjuxax (2013-07-24 00:59:42+00:00)
Title: Don't break loop on NullReferenceException. ...

I understand that this is not the ideal way to catch such errors, but I believe this is preferable to the current behavior of terminating the loop entirely when a conflicting thing occurs.

We encountered this due to a conflict between our DataContracts and our database. Someone failed to set the NOT NULL constraint on the DB and a stray NULL value was causing a malfunction here, because our DataContract does not allow that field to be nullable. Under ideal circumstances, an exception would have been raised, sent all the way up to the application instead of terminating inside of OrmLite, and the language would have made the error obvious ("Attempted to set a NULL value on an object which doesn't allow NULL", or similar). However, as that fix is much more involved, I hope that this hotfix which minimizes the potential damage will be a satisfactory shim until a more appropriate fix can be created.