File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ Migrations for 'admin':
114
114
- ` datetimes() `
115
115
- ` distinct() `
116
116
- ` extra() `
117
+ - ` prefetch_related() `
117
118
118
119
- ` Subquery ` , ` Exists ` , and using a ` QuerySet ` in ` QuerySet.annotate() ` aren't
119
120
supported.
Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ def check_query(self):
101
101
raise NotSupportedError ("QuerySet.dates() is not supported on MongoDB." )
102
102
raise NotSupportedError ("QuerySet.distinct() is not supported on MongoDB." )
103
103
if self .query .extra :
104
+ if any (key .startswith ("_prefetch_related_" ) for key in self .query .extra ):
105
+ raise NotSupportedError ("QuerySet.prefetch_related() is not supported on MongoDB." )
104
106
raise NotSupportedError ("QuerySet.extra() is not supported on MongoDB." )
105
107
if any (
106
108
isinstance (a , Aggregate ) and not isinstance (a , Count )
You can’t perform that action at this time.
0 commit comments