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

Comment (by MahavirAce):

 Replying to [comment:4 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.
 We communicated with the author of #33651. He told us he was looking to
 build a new functionality. Using his functionality, a developer will use
 Prefetch functionality with GenericForeignkey. The ticket that @rohanahata
 raised was -->we got the wrong data when we fired query as mentioned in
 our ticket . We want to solve that bug . So our ticket is not a duplicate
 of #33651. I request you to please reopen our ticket on these grounds. We
 also have a patch for the same

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34178#comment:6>
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/01070184b99d759f-564595fa-9651-425c-afbd-b85c637b87b7-000000%40eu-central-1.amazonses.com.

Reply via email to