diff --git a/mongoengine/base/document.py b/mongoengine/base/document.py index bcd761720..736e661fa 100644 --- a/mongoengine/base/document.py +++ b/mongoengine/base/document.py @@ -663,7 +663,7 @@ def _from_son(cls, son, _auto_dereference=True, only_fields=None, created=False) # get the class name from the document, falling back to the given # class if unavailable class_name = son.get('_cls', cls._class_name) - data = dict(("%s" % key, value) for key, value in son.iteritems()) + data = dict(("%s" % cls._db_field_map.get(key,key), value) for key, value in son.iteritems()) # Return correct subclass for document type if class_name != cls._class_name: