#36764: QuerySet.only() causes n+1 queries with reverse foreign key relation
-------------------------------------+-------------------------------------
     Reporter:  Bernhard Vallant     |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  queryset, only,      |             Triage Stage:
  defered                            |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Bernhard Vallant):

 I could also tracked it down to the id field being in
 `_known_related_objects`. For me the question is if the proper solution in
 this case would be to automatically append the field to the "only" fields
 (if it is necessary for the relations to properly work) or if it can be
 omitted in a way from `_known_related_objects`.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36764#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019adfa4261c-3a622bc7-2736-4ad6-a525-d77256aebb3e-000000%40eu-central-1.amazonses.com.

Reply via email to