Updated index creation now tied to Document class ((MongoEngine/mongoengine#102)
This commit is contained in:
parent
9ca96e4e17
commit
8706fbe461
8 changed files with 115 additions and 109 deletions
|
|
@ -4,6 +4,7 @@ Changelog
|
|||
|
||||
Changes in 0.8
|
||||
==============
|
||||
- Updated index creation now tied to Document class ((MongoEngine/mongoengine#102)
|
||||
- Added none() to queryset (MongoEngine/mongoengine#127)
|
||||
- Updated SequenceFields to allow post processing of the calculated counter value (MongoEngine/mongoengine#141)
|
||||
- Added clean method to documents for pre validation data cleaning (MongoEngine/mongoengine#60)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ inherited classes like so:
|
|||
collection.drop_index(index)
|
||||
|
||||
# 5. Recreate indexes
|
||||
Animal.objects._ensure_indexes()
|
||||
Animal.ensure_indexes()
|
||||
|
||||
|
||||
Document Definition
|
||||
|
|
@ -56,6 +56,13 @@ you will need to declare :attr:`allow_inheritance` in the meta data like so:
|
|||
|
||||
meta = {'allow_inheritance': True}
|
||||
|
||||
Indexes
|
||||
-------
|
||||
|
||||
Index methods are no longer tied to querysets but rather to the document class.
|
||||
Although `QuerySet._ensure_indexes` and `QuerySet.ensure_index` still exist.
|
||||
They should be replaced with :func:`~mongoengine.Document.ensure_indexes` /
|
||||
:func:`~mongoengine.Document.ensure_index`.
|
||||
|
||||
SequenceFields
|
||||
--------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue