#10977: In some cases, the intersection of two QuerySets is empty when it
shouldn't
be
---------------------------------------------------+------------------------
Reporter: zain | Owner:
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.0
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by russellm):
Ok - a request was made to push this into v1.1. To me. the fix looks ok
(although I would probably avoid using a variable name like "connection"
since it's a word that is already in use), and if the full Django test
suite still passes after applying the fix, then that's about all the
confirmation you need that the fix is correct (or at least, no more
incorrect).
The biggest thing preventing me from committing this is that that the test
case is trying to be far too clever. The original report gives a very
clear example of some queries, but no setup. The test case is -
ironically - longer than the original report, and is doing all sorts of
convoluted tricks with manually instantiated QuerySets, calls to reduce(),
and dynamically rolled out Q() objects. What's wrong with reproducing the
original problem case? It should be easy to understand what a test is
trying to achieve - in this case, the test is more complex than the
problem it's trying to solve.
--
Ticket URL: <http://code.djangoproject.com/ticket/10977#comment:4>
Django <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
-~----------~----~----~----~------~----~------~--~---