#19547: Queryset.__or__ and caching of known related instances breaking
----------------------------------------------+------------------------
     Reporter:  mjtamlyn                      |      Owner:  mjtamlyn
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.5-beta-1
     Severity:  Release blocker               |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  1
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+------------------------
 If you or together two querysets with known related instances then you can
 get some incorrect data:

 If you do `instance_1.foo_set.all() | instance_2.foo_set.all()` then all
 of the foos will have `foo.instance == instance1` even though
 `foo.instance_id == instance2.pk`.

 I have a failing test case and a partial fix on github at
 https://github.com/mjtamlyn/django/compare/known-related-objects-queryset-
 or

 The fix does ensure data is integral but it doesn't have the full
 efficiency improvement. I'm also working on a fix which solves the
 efficiency as well but it doesn't feel "right"...

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19547>
Django <https://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 https://groups.google.com/groups/opt_out.


Reply via email to