Branch: refs/heads/master Home: https://github.com/django/django Commit: a193372753ad9d1d15ad5e2d6d06bbc07ca3f433 https://github.com/django/django/commit/a193372753ad9d1d15ad5e2d6d06bbc07ca3f433 Author: Anssi Kääriäinen <akaar...@gmail.com> Date: 2012-08-21 (Tue, 21 Aug 2012)
Changed paths: M django/db/models/sql/query.py M tests/regressiontests/queries/models.py M tests/regressiontests/queries/tests.py Log Message: ----------- Fixed #17886 -- Fixed join promotion in ORed nullable queries The ORM generated a query with INNER JOIN instead of LEFT OUTER JOIN in a somewhat complicated case. The main issue was that there was a chain of nullable FK -> non-nullble FK, and the join promotion logic didn't see the need to promote the non-nullable FK even if the previous nullable FK was already promoted to LOUTER JOIN. This resulted in a query like a LOUTER b INNER c, which incorrectly prunes results. -- 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.