Changed the inheritance model to remove types

The inheritance model has changed, we no longer need to store an array of
`types` with the model we can just use the classname in `_cls`.

See the upgrade docs for information on how to upgrade
MongoEngine/mongoengine#148
This commit is contained in:
Ross Lawley
2012-10-09 15:02:13 +00:00
parent 31ec7907b5
commit 6f29d12386
40 changed files with 4856 additions and 4622 deletions

View File

@@ -164,7 +164,7 @@ class DeReference(object):
if isinstance(items, (dict, SON)):
if '_ref' in items:
return self.object_map.get(items['_ref'].id, items)
elif '_types' in items and '_cls' in items:
elif '_cls' in items:
doc = get_document(items['_cls'])._from_son(items)
doc._data = self._attach_objects(doc._data, depth, doc, None)
return doc