Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix qs.order_by() join promotion for already existing joins #90

Closed
wants to merge 1 commit into from

Conversation

akaariai
Copy link
Member

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 fixed the logic to
only promote new joins, previously all applicable joins were promoted.

Thanks to Bruno Desthuilliers for spotting this corner case.

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 fixed the logic to
only promote new joins, previously all applicable joins were promoted.

Thanks to Bruno Desthuilliers for spotting this corner case.
@akaariai
Copy link
Member Author

Pushed in manually in 8c72aa2

@akaariai akaariai closed this May 24, 2012
sztrovacsek pushed a commit to sztrovacsek/django that referenced this pull request Mar 7, 2015
Working through tutorial independently online.
nanuxbe pushed a commit to nanuxbe/django that referenced this pull request Jul 2, 2016
Remove stray comment fragment at end of file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant