Inheritance is off by default (MongoEngine/mongoengine#122)

This commit is contained in:
Ross Lawley
2012-10-17 11:36:18 +00:00
parent 6f29d12386
commit 3d5b6ae332
20 changed files with 245 additions and 177 deletions

View File

@@ -58,7 +58,7 @@ class QuerySet(object):
# If inheritance is allowed, only return instances and instances of
# subclasses of the class being used
if document._meta.get('allow_inheritance') != False:
if document._meta.get('allow_inheritance') == True:
self._initial_query = {"_cls": {"$in": self._document._subclasses}}
self._loaded_fields = QueryFieldList(always_include=['_cls'])
self._cursor_obj = None