We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94f7027 commit d61cbffCopy full SHA for d61cbff
django_mongodb/compiler.py
@@ -442,6 +442,8 @@ def collection_name(self):
442
if isinstance(v, BaseTable) and self.query.alias_refcount[k]
443
)
444
except StopIteration:
445
+ # If the query does not have any table, collection '__null' is used
446
+ # with one document in order to support subqueries and expressions.
447
query = self.query_class(self)
448
query.aggregation_pipeline = [{"$facet": {"__null": []}}]
449
self.subqueries.insert(0, query)
0 commit comments