[TYPO3-mvc] groupBy

Martin Kutschker masi-no at spam-typo3.org
Thu Nov 4 12:07:46 CET 2010


Am 04.11.2010 11:32, schrieb Felix Oertel:
> Hey,
> 
> Am 04.11.10 11:02, schrieb Franz Koch:
>> Of course you still might want the grouped results to be mapped on objects, but those have to be
>> out of the scope of the persistence layer.
> 
> Yeah, I would love to et
> 
> GROUP1
> .Object1
> .Object2
> GROUP2
> .Object3
> .Object4
> 
> but this is not like SQL's "group by" works either. Don't know if we should implement it this way
> anyway.

What you want is an interesting feature. I would try to make clear that the query() method is NOT an
SQL query. Pushing my idea with dataQuery() a bit further groupBy() could work differently for both
queries. Or we could introduce a better name for the "aggregating" groupBy(). After all it does NOT
group the rows, it accumulates them. In the times of IDEs I suggest aggregateBy() for the SQL-like
"grouping" and groupBy() for the "real" grouping (as posted by you).

Masi


More information about the TYPO3-project-typo3v4mvc mailing list