#35442: QuerySet.only() causes n+1 queries with reverse foreign key relation 
when
related id is not included.
-------------------------------------+-------------------------------------
     Reporter:  REGNIER Guillaume    |                    Owner:  Samriddha
                                     |  Kumar Tripathi
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

 Replying to [comment:14 Simon Charette]:
 > Replying to [comment:13 Jacob Walls]:
 > > Replying to [comment:1 Simon Charette]:
 > > > another ticket that asked for `"company_id"` to be implicitly
 included in the `only` call that I just can't find anymore.
 > >
 > > Could it be #30124?
 >
 > Yep it was, thanks for the sleuthing Jacob!

 The discussion went in another direction, but the underlying case
 presented was a duplicate.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35442#comment:19>
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/0107019bb3c4a582-16c9d23f-2428-40f8-ba83-a05f74f36e6a-000000%40eu-central-1.amazonses.com.

Reply via email to