'Can I use select_related Django QuerySet method in reverse relationships?
class A(Model):
pass
class B(Model):
a = ForeignKey(A)
B.objects.select_related("a") # this works
A.objects.select_related("b") # this doesn't
How do I make the second line work? Are there any ways to do the same thing in some other ways?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
