logo       

annotations only in 1.1 ?: msg#02276

DjangoUsers

Subject: annotations only in 1.1 ?


I want find all instances of model KeyWord, where ManyToMany field
categories is empty. I think in versieon 1.1 is the appropriate code
like this:

... KeyWord.objects.annotate(cnt = Count(categories)).filter(cnt =
0) ...

What is the similar code in old version 1.0 for resolve the same
result. Should I use extra() method and go to the table level
(SELECT ...) ?

--~--~---------~--~----~------------~-------~--~----~
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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
django-users+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise