diff --git a/django_mongodb_backend/features.py b/django_mongodb_backend/features.py index bb709b1f1..4fdef5e1f 100644 --- a/django_mongodb_backend/features.py +++ b/django_mongodb_backend/features.py @@ -87,8 +87,6 @@ class DatabaseFeatures(BaseDatabaseFeatures): # of $setIsSubset must be arrays. Second argument is of type: null" # https://jira.mongodb.org/browse/SERVER-99186 "model_fields_.test_arrayfield.QueryingTests.test_contained_by_subquery", - # JSONArray not implemented. - "db_functions.json.test_json_array.JSONArrayTests", # Some usage of prefetch_related() raises "ColPairs is not supported." "known_related_objects.tests.ExistingRelatedInstancesTests.test_one_to_one_multi_prefetch_related", "known_related_objects.tests.ExistingRelatedInstancesTests.test_one_to_one_prefetch_related", diff --git a/django_mongodb_backend/functions.py b/django_mongodb_backend/functions.py index 750a548f8..191ae9cae 100644 --- a/django_mongodb_backend/functions.py +++ b/django_mongodb_backend/functions.py @@ -1,5 +1,6 @@ from django.db import NotSupportedError from django.db.models.expressions import Func +from django.db.models.functions import JSONArray from django.db.models.functions.comparison import Cast, Coalesce, Greatest, Least, NullIf from django.db.models.functions.datetime import ( Extract, @@ -238,6 +239,7 @@ def register_functions(): Cot.as_mql = cot Extract.as_mql = extract Func.as_mql = func + JSONArray.as_mql = process_lhs Left.as_mql = left Length.as_mql = length Log.as_mql = log