From d128542ad5c18cf88db75e3e83ad9870a055d743 Mon Sep 17 00:00:00 2001 From: Kojo Idrissa Date: Thu, 14 Apr 2022 14:37:05 -0500 Subject: [PATCH] corrected grammar to improve clarity --- docs/api-guide/relations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/relations.md b/docs/api-guide/relations.md index 4547253b0..9c8295b85 100644 --- a/docs/api-guide/relations.md +++ b/docs/api-guide/relations.md @@ -19,7 +19,7 @@ Relational fields are used to represent model relationships. They can be applie --- -**Note:** REST Framework does not attempt to automatically optimize querysets passed to serializers in terms of `select_related` and `prefetch_related` since it would be too much magic. A serializer with a field spanning an orm relation through its source attribute could require an additional database hit to fetch related object from the database. It is the programmer's responsibility to optimize queries to avoid additional database hits which could occur while using such a serializer. +**Note:** REST Framework does not attempt to automatically optimize querysets passed to serializers in terms of `select_related` and `prefetch_related` since it would be too much magic. A serializer with a field spanning an orm relation through its source attribute could require an additional database hit to fetch related objects from the database. It is the programmer's responsibility to optimize queries to avoid additional database hits which could occur while using such a serializer. For example, the following serializer would lead to a database hit each time evaluating the tracks field if it is not prefetched: