Removed CollectionManager, moved work to QuerySet

As CollectionManager has been replaced with QuerySet and
QuerySetManager, collection.py has been renamed queryset.py.
This commit is contained in:
Harry Marr
2009-11-22 16:46:08 +00:00
parent 70ee0f57ea
commit d4fc5c9260
6 changed files with 67 additions and 62 deletions

View File

@@ -18,7 +18,8 @@ class Document(BaseDocument):
"""Save the document to the database. If the document already exists,
it will be updated, otherwise it will be created.
"""
self.objects._save_document(self)
_id = self.objects._collection.save(self._to_mongo())
self._id = _id
@classmethod
def drop_collection(cls):