Return a new QuerySet instance that will select related objects. If fields are specified, they must be ForeignKey fields and only those related objects are included in the selection.
(self, *fields: str)
| 978 | return queryset |
| 979 | |
| 980 | def select_related(self, *fields: str) -> QuerySet[MODEL]: |
| 981 | """ |
| 982 | Return a new QuerySet instance that will select related objects. |
| 983 | |
| 984 | If fields are specified, they must be ForeignKey fields and only those |
| 985 | related objects are included in the selection. |
| 986 | """ |
| 987 | |
| 988 | queryset = self._clone() |
| 989 | for field in fields: |
| 990 | queryset._select_related.add(field) |
| 991 | return queryset |
| 992 | |
| 993 | def force_index(self, *index_names: str) -> QuerySet[MODEL]: |
| 994 | """ |