Skip to content

Commit 9a8ffd5

Browse files
committed
Embedded field does not generates join ref counts.
1 parent e066095 commit 9a8ffd5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

django_mongodb/compiler.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
from django.utils.functional import cached_property
1818
from pymongo import ASCENDING, DESCENDING
1919

20-
from django_mongodb.fields import EmbeddedModelField
21-
2220
from .base import Cursor
2321
from .query import MongoQuery, wrap_database_errors
2422

@@ -549,11 +547,7 @@ def get_combinator_queries(self):
549547
def get_lookup_pipeline(self):
550548
result = []
551549
for alias in tuple(self.query.alias_map):
552-
if (
553-
not self.query.alias_refcount[alias]
554-
or self.collection_name == alias
555-
or isinstance(self.query.alias_map[alias].join_field, EmbeddedModelField)
556-
):
550+
if not self.query.alias_refcount[alias] or self.collection_name == alias:
557551
continue
558552
result += self.query.alias_map[alias].as_mql(self, self.connection)
559553
return result

0 commit comments

Comments
 (0)