We are pleased to announce that Django MongoDB Backend 6.0.3 is now available!
New features
-
Added :ref:`support for matching ObjectIDs in URL patterns `.
-
Added polymorphic subfield support to :class:`~django_mongodb_backend.indexes.EmbeddedFieldIndex` and :class:`~django_mongodb_backend.constraints.EmbeddedFieldUniqueConstraint`.
See :ref:`polymorphic-embedded-model-field-indexes`, :ref:`polymorphic-embedded-model-field-unique-constraints`, :ref:`polymorphic-embedded-model-array-field-indexes`, and :ref:`polymorphic-embedded-model-array-field-unique-constraints`.
-
str(queryset.query)now outputs MQL instead of SQL.
Bug fixes
-
Made model saving raise an exception to prevent a misconfiguration from resulting in the creation of models with encrypted fields in non-encrypted databases.
-
Made
makemigrationsserialize embedded model references as strings so that references in migrations don’t need to be adjusted if models are later removed. -
Added a helpful
NotSupportedErrorforQuerySet.extra(where=...)andStringAgg(..., distinct=True)rather than crashing with more obscure exceptions.
Deprecated features
- Defining indexes and constraints on embedded models using
unique=True,db_index=True,Meta.constraints,Meta.indexes, andMeta.unique_togetheris deprecated in favor of using :class:`~django_mongodb_backend.indexes.EmbeddedFieldIndex` and :class:`~django_mongodb_backend.constraints.EmbeddedFieldUniqueConstraint` on the top-level model. See :ref:`inline-constraints-and-indexes-deprecation` for an example.
Enjoy the release and if you experience any issues please report them!