Branch: refs/heads/master
  Home:   https://github.com/django/django
  Commit: 8c72aa237918e31a525022f72b22cac75451af86
      
https://github.com/django/django/commit/8c72aa237918e31a525022f72b22cac75451af86
  Author: Anssi Kääriäinen <[email protected]>
  Date:   2012-05-24 (Thu, 24 May 2012)

  Changed paths:
    M django/db/models/sql/compiler.py
    M tests/regressiontests/queries/models.py
    M tests/regressiontests/queries/tests.py

  Log Message:
  -----------
  Fixed qs.order_by() join promotion for already existing joins

When order_by causes new joins to be added to the query, the joins must
be LEFT OUTER joins for nullable relations, otherwise the order_by
could cause the results to be altered. This commit fixes the logic to
only promote new joins, previously all joins in the order_by lookup
path were promoted.

Thanks to Bruno Desthuilliers for spotting this corner case.



-- 
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