Merge branch 'v0.4' of github.com:hmarr/mongoengine into v0.4
This commit is contained in:
@@ -255,6 +255,7 @@ class TopLevelDocumentMetaclass(DocumentMetaclass):
|
||||
'index_background': False,
|
||||
'index_drop_dups': False,
|
||||
'index_opts': {},
|
||||
'queryset_class': QuerySet,
|
||||
}
|
||||
meta.update(base_meta)
|
||||
|
||||
|
||||
@@ -999,7 +999,8 @@ class QuerySetManager(object):
|
||||
self._collection = db[collection]
|
||||
|
||||
# owner is the document that contains the QuerySetManager
|
||||
queryset = QuerySet(owner, self._collection)
|
||||
queryset_class = owner._meta['queryset_class'] or QuerySet
|
||||
queryset = queryset_class(owner, self._collection)
|
||||
if self._manager_func:
|
||||
if self._manager_func.func_code.co_argcount == 1:
|
||||
queryset = self._manager_func(queryset)
|
||||
|
||||
Reference in New Issue
Block a user