#17485: Queries with both deferred fields and select_related defer field.name
instead of field.attname
-------------------------------------+-------------------------------------
     Reporter:  koniiiik             |                    Owner:  koniiiik
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  SVN
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  defer                |      Needs documentation:  0
  select_related                     |  Patch needs improvement:  0
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by koniiiik):

 Replying to [comment:3 aaugustin]:
 > So shouldn't we forbid using defer and select_related on the same field
 entirely, by raising an exception?
 The problem is, what should happen if you issue a `select_related` with a
 depth and then defer a `ForeignKey` field? Should it raise an exception as
 well?

 Other than that, I think both routes are about the same in terms of
 complexity of solution, either way you have to detect the affected
 `ForeignKey`s and react accordingly.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17485#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to