Known issues and limitations

This document summarizes some known issues and limitations of this library. If you notice an issue not listed, use the Issue tracker to report a bug or request a feature.

Like any database, MongoDB has some particularities. Also keep in mind that because MongoDB is a NoSQL database, it’s impossible to implement SQL-specific functionality.

Model fields

Querying

  • The following QuerySet methods aren’t supported:

  • QuerySet.delete() and update() do not support queries that span multiple collections.

  • The StringAgg aggregation function isn’t supported.

  • When querying JSONField:

    • There is no way to distinguish between a JSON "null" (represented by Value(None, JSONField())) and a SQL null (queried using the isnull lookup). Both of these queries return both of these nulls.

    • Using JSON keys in QuerySet.exclude() incorrectly treats objects with absent keys as satisfying the exclusion.

Database functions

Transaction management

By default, query execution uses Django and MongoDB’s default behavior of autocommit mode. Each query is immediately committed to the database.

Django’s transaction management APIs are not supported. Instead, this package provides its own transaction APIs.

Database introspection

Due to the lack of ability to introspect MongoDB collection schema, inspectdb and migrate --fake-initial aren’t supported.

Caching

Database caching is not supported.