#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                             |  
---------------------------------------------------+------------------------
Changes (by clement):

  * owner:  clement =>
  * has_patch:  0 => 1

Comment:

 The attached fix does the following in !BaseQuery.combine() :

  * get the source of the join from '''alias_map[alias][LHS_ALIAS]'''
  * check if there's a corresponding newly labelled alias in
 '''change_map''' dict, and use it in that case
  * send that source as the first element of the '''connection''' tuple to
 !BaseQuery.join() (the rest of the tuple being what is in
 '''rev_join_map[alias]''')

 I've ran the full test suite (./runtests.py) against this patch, and it
 passes, but this being my first shot at Django's internals, I don't have a
 lot of insight on how large the impact of that patch might be.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10977#comment:3>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to