#2080: OR lookup across many-to-one relationships gives unexpected results
------------------------------+---------------------------------------------
 Reporter:  akaihola          |       Owner:  adrian
     Type:  defect            |      Status:  new   
 Priority:  normal            |   Milestone:        
Component:  Database wrapper  |     Version:        
 Severity:  normal            |    Keywords:        
------------------------------+---------------------------------------------
 If
  * model {{{B}}} has a foreign key on model {{{A}}},
  * there is an {{{a1 = A(field1=value1)}}} object but no related {{{B}}}
 objects
 and you do
 
 {{{
 A.objects.filter(Q(field1=value1) | Q(b__field2=value2))
 }}}
 
 the result will fail to include {{{a1}}}.
 
 This is quite unexpected in my opinion, and I think the reason is that the
 resulting SQL query uses an inner join instead of an outer join.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2080>
Django <http://code.djangoproject.org/>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to