#7512: including a nullable foreign key reference in Meta ordering has
unexpected
results
----------------------------------------------------+-----------------------
Reporter: R. Bailey <[EMAIL PROTECTED]> | Owner: gav
Status: new | Milestone: 1.0
Component: Database wrapper | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 1 |
----------------------------------------------------+-----------------------
Changes (by mtredinnick):
* needs_better_patch: 0 => 1
Comment:
This patch isn't correct. It will lead to far too many outer joins. It
only addresses the situation where `setup_joins()` is called for ordering,
but, much more importantly, `setup_joins()` is used by `add_filter()`. And
when a filter is being incorporated that is not comparing against
potentially NULL values, we should ''not'' be using outer joins. That is
why there is a subsequent pass in `add_filter()` to do some join promotion
if the comparison is against something that could be null, rather than
doing that in `setup_joins()`.
So the test case could well be useful, but the changes to `setup_joins()`
are not appropriate.
--
Ticket URL: <http://code.djangoproject.com/ticket/7512#comment:6>
Django Code <http://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
-~----------~----~----~----~------~----~------~--~---