On Fri, 21 Jul 2006 09:50:15 +1000, Malcolm Tredinnick wrote:

> Because of the way QuerySets are constructed, there's no easy way to
> tell when a user is walking into this case. The current behaviour may
> reasonably be considered a semi-bug, however it's unavoidable at the
> moment since we form the query by combining the "where" clauses as
> pieces, rather than taking a more holistic view of the query. Fixing
> that would be unbelievably hard in the current implementation (to get it
> right for the general case). It might happen one day, but for now it's
> the old punchline that follows: "Doctor, it hurts when I do this..."

Haha, well, doctor, I won't hold my breath then :) Would definitely be
nice to have though.

On another note, there seems to be another unhandled corner case. If the
query returns no results, the final

return self.filter(id__in = group_idents)

gets called with group_idents=[].  filter(id__in=[]) seems to make the ORM
unhappy. I "fixed" this with the hacktastic solution of always appending a
0 to group_idents. It seems that all id's are > 0, which means that
id__in=[0] will return an empty query set. Is this a reasonable solution?

Regards
Neilen

-- 
you know its kind of tragic 
we live in the new world
but we've lost the magic
-- Battery 9 (www.battery9.co.za)


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to