I really like the .annotate() version. The way this feature works with 
.annotate() is easy to understand if you understand how existing .annotate() 
functions work. But, if we go with this approach, it might look a bit strange 
if we don't do an automatic select_related(). On the other hand, there are 
cases where you definitely don't want to do a select_related(), like if the 
relation annotation is only used in further aggregation. So, maybe there should 
be opt-out, or maybe we just don't do any automatic select_related for this 
case.

I do like the .annotate() version for other reasons, too. There are variants of 
this feature which would work nicely with the annotate style, that is either 
annotation querysets for objects that do *not* have a relation to the original 
queryset, or annotation raw SQL directly.

 - Anssi
PS. It seems the Google Groups UI acts a bit strange for me today. I hope this 
post does arrive to the group in a readable format...

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4ceb0715-bd6b-4860-a6e6-77dc9ecabae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to