Add support for the elemMatch projection operator. Add basic tests to the fields queryset method.

This commit is contained in:
Agustin Barto
2020-02-14 16:43:07 -03:00
parent 235b1a3679
commit 4bca3de42f
2 changed files with 52 additions and 1 deletions

View File

@@ -1037,7 +1037,7 @@ class BaseQuerySet(object):
"""
# Check for an operator and transform to mongo-style if there is
operators = ["slice"]
operators = ["slice", "elemMatch"]
cleaned_fields = []
for key, value in kwargs.items():
parts = key.split("__")