Added select_related() and refactored dereferencing
Added a dereference class to handle both select_related / recursive dereferencing and fetching dereference. Refs #206
This commit is contained in:
parent
14be7ba2e2
commit
87f486c4f1
6 changed files with 459 additions and 80 deletions
|
|
@ -932,7 +932,7 @@ class DocumentTest(unittest.TestCase):
|
|||
list_field = ListField()
|
||||
embedded_field = EmbeddedDocumentField(Embedded)
|
||||
|
||||
Doc.drop_collection
|
||||
Doc.drop_collection()
|
||||
doc = Doc()
|
||||
doc.dict_field = {'hello': 'world'}
|
||||
doc.list_field = ['1', 2, {'hello': 'world'}]
|
||||
|
|
@ -1125,7 +1125,7 @@ class DocumentTest(unittest.TestCase):
|
|||
dict_field = DictField()
|
||||
list_field = ListField()
|
||||
|
||||
Doc.drop_collection
|
||||
Doc.drop_collection()
|
||||
doc = Doc()
|
||||
doc.save()
|
||||
|
||||
|
|
@ -1180,7 +1180,7 @@ class DocumentTest(unittest.TestCase):
|
|||
list_field = ListField()
|
||||
embedded_field = EmbeddedDocumentField(Embedded)
|
||||
|
||||
Doc.drop_collection
|
||||
Doc.drop_collection()
|
||||
doc = Doc()
|
||||
doc.save()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue