#23270: select_related on fields pointing to subclasses does not work when using
defer
-------------------------------------+-------------------------------------
     Reporter:  islavov              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.7-rc-2
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  select_related       |      Needs documentation:  0
  defer                              |  Patch needs improvement:  1
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by Vladimiroff):

 @akaariai, you're right. I was building the field_names wrong. The issue
 was not only that `base_ptr_id` was with the wrong value, but *all* of the
 values was getting mapped to the wrong field.

 The only solution that I found was completely rebuilding the whole list
 from scratch. Was that a good idea?
 
https://github.com/Vladimiroff/django/commit/cfd87b8157bf38ce145758e0251f5c14dfb5e60f

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23270#comment:7>
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.85c23e85561977a089aea98695c3b117%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to