hmarr/mongoengine — Issue #357: exceptions instead of default values for unfetched fields of partial documents
Author: joeshaw
Created: 2011-11-11 21:36:46+00:00
State: open

This is a feature request.

It would be nice when fetching partial documents with `only()` for MongoEngine to throw an exception if I try to access an unfetched field rather than returning the default value. In general, I think if I try to access one of these fields it's really indicative of a bug in my code, and I probably want the real value. The default value might cause subtle problems where an exception would make bugs like that clear.