Thanks for the hint!
This is not the first time that I stumble on the fact that
the
documentation is ahead of the code. And that's very
problematic
because you spend hours trying to understand why it doesn't
work as
the doc says, while it's in fact a bug in the code or a
feature that
hasn't been merged in the trunk yet...
Cheers!
Julien
On Dec 21, 4:24 pm, Malcolm Tredinnick <malc... pointy-stick.com>
wrote:
> On Thu, 2007-12-20 at 21:11 -0800, Julien wrote:
> > Hi,
>
> > I've been struggling with union-ing querysets.
Here's an example:
>
> > >>> qs1=User.objects.filter(........)
> > >>> qs1=User.objects.filter(........)
> > >>> qs1
> > [<User: john>]
> > >>> qs2
> > []
> > >>> qs1 | qs2
> > []
> > >>> qs1 or qs2
> > [<User: john>]
>
> > I thought that "|" was equivalent to a
"or", as mentioned in the doc:
> >http://www.djangoproject.com/documentati
on/db-api/#complex-lookups-wi...
>
> > I'm fairly new to Django, but this look like a bug
to me. Is that so?
>
> Yeah, it's a bug. See, for example, tickets #2080 and
#2253. They're
> fixed on the queryset-refactor branch, so will be
merged into trunk when
> that's done.
>
> Regards,
> Malcolm
>
> --
> What if there were no hypothetical questions?http://www.pointy-s
tick.com/blog/
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|