I can't run the tests on trunk, as we're not quite up that far, but it
should be working.
http://code.djangoproject.com/ticket/4997#comment:1
I plan to add having=[] support to extra as well this weekend.
When doing select={'choices': 'COUNT(...)'} It threw an error in
__set__ on the manager.add(*value) call (fields/related.py); choices
was a related_name call. It however did not error when doing
select={'choices': 'my_column'}
Hi David,
The idea of a 'group_by' and 'having' clause has been floated many
times before, and has been rejected in preference of an 'aggregations'
framework that provides a higher level, ORM-like interface (rather
than a SQL like interface) to the the ideas that group_by and having
expose. See Ticket #3566 for details on current thinking.
Adding this feature is waiting on a refactor of the internals of the
query engine. Malcolm is in the process of doing this refactor; any
patch against query.py is likely to be rendered invalid in the near
future.
Yours,
Russ Magee %-)
We've been struggling to use the Django ORM for a long while now,
because it has limited support for complex queries. GROUP BY is a
nescesity. I don't see any problem with redoing the QuerySet methods,
but there's no reason to not put in working fixes right now.
On Jul 27, 8:06 pm, "Russell Keith-Magee" <freakboy3...@gmail.com>
wrote:
Yes, there is a very good reason to not put the fixes in. We're not
going to add a feature to the db-api that we know, a priori, is going
to be removed (or at the very least substantially changed) in the near
future.
I know the Queryset refactor has been a long time coming. However, it
will happen pre-1.0.
If you _really_ need group-by/having _right now_, there is nothing
stopping you from putting your patch on your local version of Django.
Yours,
Russ Magee %-)
The Django developers are ::gasp:: real people, with real jobs and
real lives. I see this perhaps more readily than most, since a few of
them are my co-workers. Considering all the other stuff they have to
do, it's amazing that they still find time to devote to Django.
If you want to help QuerySet refactoring along, jump in and offer to
lend Malcolm a hand; what you *shouldn't* do is toss out abusive,
thoughtless remarks like that.
We are real people, and developers also :)
On Jul 27, 8:59 pm, "Tom Tobin" <korp...@korpios.com> wrote: