orm: Allow specification of GROUP BY clause, speed-up client stats
This patch changes the automatic GROUP BY clause for annotations in the ORM including aggregate queries (like COUNT), by allowing the query to specify "distinct" fields. If distinct fields are specified, then no other fields are automatically added to the GROUP BY clause of the compiled query. This will likely only be supported by MySQL, as other engines and the ANSI standard require all non-aggregate fields in the SELECT clause to be present in the GROUP BY clause.
Loading
Please register or sign in to comment