#16439: select_related does not work with nullable fields unless field is
specified.
-------------------------------+------------------------------------
     Reporter:  dloewenherz    |                    Owner:  nobody
         Type:  Bug            |                   Status:  closed
    Component:  Documentation  |                  Version:  1.3
     Severity:  Normal         |               Resolution:  fixed
     Keywords:  db             |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  1
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by mtredinnick):

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


Comment:

 Quoting from the current documentation
 
(https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.select_related):

    Note that, by default, select_related() does not follow foreign keys
 that have null=True.

 So no documentation patch required. The reason it's like this is because
 nullable joins require an outer join between tables and is sufficiently
 performance impacting to not do by default.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16439#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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to