We are pleased to announce that Django MongoDB Backend 5.2.2 is now available!
New features
- :class:
.SearchIndex’s newfield_mappings,analyzer, andsearch_analyzerarguments allow creating more complex indexes.
Bug fixes
- Fixed a
KeyErrorcrash when loading models withEmbeddedModelfields that use a database converter, if the field isn’t present in the data (e.g. data not written by Django, or after a field was added to an existingEmbeddedModel). - Made
EmbeddedModelfields respect :attr:~django.db.models.Field.db_column. - Corrected the search index type of
EmbeddedModelFieldandPolymorphicEmbeddedModelFieldfromembeddedDocumentstodocument. - Fixed
transaction.atomic()crash if the database connection isn’t initialized.
Performance improvements
- Continued the query optimization work started in 5.2.1, making queries avoid using
$exprwhere possible, so that they can use indexes.
Deprecated features
django_mongodb_backend.utils.parse_uri()is deprecated in favor of putting the connection string inDATABASES["HOST"]. See :ref:the deprecation timeline <parse-uri-deprecation>for upgrade instructions.
Enjoy the release and if you experience any issues please report them!