#30894: Reverse OneToOneField relation: `prefetch_related` uses `related_name`
while `select_related` uses `related_query_name`
-------------------------------------+-------------------------------------
     Reporter:  Adam Sołtysik        |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  2.2
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Adam Sołtysik):

 This only explains why it was easier to implement that way, but doesn't
 prove it shouldn't work the other way. I started using
 `prefetch_related()` instead of `select_related()` when I found out that
 it is much faster with `LIMIT`ed queries (at least on PostgreSQL). The
 fact that I had to change relation names was a bit confusing. But if you
 don't think this should be changed, then so be it.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30894#comment:5>
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/065.2275933ac079ea23ed98a4af6c346d9d%40djangoproject.com.

Reply via email to