#24272: Better error messages for prefetch_related
-------------------------------------+-------------------------------------
     Reporter:  Todor Velichkov      |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  duplicate
     Keywords:  prefetch_related,    |             Triage Stage:  Accepted
  GenericRelation,                   |
  related_query_name                 |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 I think that we can actually close this one as a duplicate of #33651 as
 the latter would allow the following syntax to be used

 {{{#!python
 TaggedItem.objects.prefetch_related(
     GenericPrefetch(
         "content_object", [
             Book.objects.select_related('author'),
             Movie.objects.select_related('director'),
         ]
     ),
 )
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/24272#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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182c8e36490-5ea5c464-fa09-4863-ba8c-f9d581e4f703-000000%40eu-central-1.amazonses.com.

Reply via email to