allancaffee/scaly-mongo — Issue #6: Failing to reload should raise a more description exception
Author: allancaffee
Created: 2012-01-18 02:23:45+00:00
State: open

Currently (v0.1.6) when you call `reload()` on a model and it can no longer be found on the server ScalyMongo crashes like:

TypeError: 'NoneType' object is not iterable

It should handle the case that the document is no longer found on the server. Not being found could be caused by:

* The document being deleted from the collection.
* Something in the shard key being changed (perhaps we should try reloading just by `_id` since this isn't specifically wrong?)