Skip to content

Commit 7094025

Browse files
committed
improve changelog
1 parent 5add868 commit 7094025

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

docs/changelog.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ Development
99
- (Fill this out as you fix issues and develop your features).
1010
- BREAKING CHANGE: Improved the performance of :meth:`~mongoengine.Document.save()`
1111
by removing the call to :meth:`~mongoengine.Document.ensure_indexes` unless
12-
``meta['auto_create_index_on_save']`` is set to True.
12+
``meta['auto_create_index_on_save']`` is set to True. With the default settings, Document indexes
13+
will still be created on the fly, during the first usage of the collection (query, insert, etc),
14+
they will just not be re-created whenever .save() is called.
1315
- Added meta ``auto_create_index_on_save`` so you can enable index creation
14-
on :meth:`~mongoengine.Document.save()`.
16+
on :meth:`~mongoengine.Document.save()` (as it was < 0.26.0).
1517

1618
Changes in 0.25.0
1719
=================
1820
- Support MONGODB-AWS authentication mechanism (with `authmechanismproperties`) #2507
19-
- Turning off dereferencing for the results of distinct query. #2663
21+
- Bug Fix - distinct query doesn't obey the ``no_dereference()``. #2663
2022
- Add tests against Mongo 5.0 in pipeline
2123
- Drop support for Python 3.6 (EOL)
2224
- Bug fix support for PyMongo>=4 to fix "pymongo.errors.InvalidOperation: Cannot use MongoClient after close"

mongoengine/document.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def save(
383383
meta['cascade'] = True. Also you can pass different kwargs to
384384
the cascade save using cascade_kwargs which overwrites the
385385
existing kwargs with custom values.
386-
.. versionchanged:: 0.25
386+
.. versionchanged:: 0.26
387387
save() no longer calls :meth:`~mongoengine.Document.ensure_indexes`
388388
unless ``meta['auto_create_index_on_save']`` is set to True.
389389
@@ -410,7 +410,7 @@ def save(
410410
# it might be refreshed by the pre_save_post_validation hook, e.g., for etag generation
411411
doc = self.to_mongo()
412412

413-
# Initialize the Document underlying pymongo.Collection (+create indexes) if not already initialized
413+
# Initialize the Document's underlying pymongo.Collection (+create indexes) if not already initialized
414414
# Important to do this here to avoid that the index creation gets wrapped in the try/except block below
415415
# and turned into mongoengine.OperationError
416416
if self._collection is None:

0 commit comments

Comments
 (0)