Re: Making QuerySets composable

2016-01-24 Thread Anssi Kääriäinen
We have room for some improvement here. It should be possible to add subqueries to the current query. This would be especially useful for adding aggregates. For aggregates we need this feature because the current API doesn't work for anything but simple cases. For example Book.objects.annotate(aut

Re: Making QuerySets composable

2016-01-22 Thread Patryk Zawadzki
pt., 22.01.2016 o 17:44 użytkownik charettes napisał: > Hi Patryk, > > > > Currently we have Prefetch objects that kind of solve this problem for > M2M > > relations but perhaps it would be nice to also be able to use QuerySets > in > > select_related() or even in filter(). I don't think Prefetch

Re: Making QuerySets composable

2016-01-22 Thread charettes
Hi Patryk, > Currently we have Prefetch objects that kind of solve this problem for M2M > relations but perhaps it would be nice to also be able to use QuerySets in > select_related() or even in filter(). I don't think Prefetch objects are best > suited for that and I personally find having to in