#34178: Prefetching a foreign key on GenericForeignKey results in incorrect
queryset being selected
-------------------------------------+-------------------------------------
     Reporter:  Rohan Nahata         |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  4.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  duplicate
     Keywords:  GenericForeignKey,   |             Triage Stage:
  prefetch_related                   |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

 > It silently does the wrong thing instead of erroring out.

 As far as I'm aware, raising an error would require fetching the content
 type for each instance which is inefficient and may cause a performance
 regression, see #21422.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34178#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 on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184a3f816d5-ac210f3d-4220-4ed6-ac14-11147f62d4ab-000000%40eu-central-1.amazonses.com.

Reply via email to