On Thu, Sep 06, [EMAIL PROTECTED] wrote:

> I thought I was close with this, but it only returned tickets assigned
> to me. (The parenthesis around the 2nd and 3rd Q's obviously didn't
> help)
> 
> Ticket.objects.filter(Q(private__exact=False) |
> (Q(private__exact=True) & Q(assigned_user__username__exact='snewman')))

Well, that's a known bug. Django uses inner joins even when combining
queries. A refactoring of the ORM is on the way, in the mean time you could
only either write custom SQL or resort to multiple queries.

Michael

-- 
noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg -
Tel +49-911-9352-0 - Fax +49-911-9352-100
http://www.noris.de - The IT-Outsourcing Company
 
Vorstand: Ingo Kraupa (Vorsitzender), Joachim Astel, Hansjochen Klenk - 
Vorsitzender des Aufsichtsrats: Stefan Schnabel - AG Nürnberg HRB 17689

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to