Django MongoDB Backend 5.2.2 has been released!

We are pleased to announce that Django MongoDB Backend 5.2.2 is now available!

New features

  • :class:.SearchIndex’s new field_mappings, analyzer, and search_analyzer arguments allow creating more complex indexes.

Bug fixes

  • Fixed a KeyError crash when loading models with EmbeddedModel fields 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 existing EmbeddedModel).
  • Made EmbeddedModel fields respect :attr:~django.db.models.Field.db_column.
  • Corrected the search index type of EmbeddedModelField and PolymorphicEmbeddedModelField from embeddedDocuments to document.
  • 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 $expr where possible, so that they can use indexes.

Deprecated features

Enjoy the release and if you experience any issues please report them!

Django MongoDB Backend 5.2.2 has just been released, and it likely brings important updates for Django projects using MongoDB. Here’s how you can approach the update:

What to Expect in Version 5.2.2

  1. New Features: Check the release notes for any new capabilities, such as improved MongoDB support or optimizations to query execution. Features like better aggregation support or enhanced indexing could improve your app’s performance.
  2. Bug Fixes: Often, updates address bugs from previous versions. This version may resolve issues with query handling, database operations, or compatibility with newer Django or MongoDB versions.
  3. Compatibility: Ensure this version works with your current Django version. Some updates may require you to upgrade Django or modify your project settings for smooth integration.
  4. Breaking Changes: Review for any deprecated features or changes that could break your current codebase. This is crucial if you rely on specific features or behaviors from older versions.
  5. Upgrading: To upgrade, run pip install --upgrade djongo. Always test the update in a staging environment to ensure everything functions as expected before deploying to production.

By keeping up with this release, you’ll ensure your Django app with MongoDB remains optimized, stable, and future-proof.