[TYPO3-mvc] groupBy

Martin Kutschker masi-no at spam-typo3.org
Thu Nov 4 14:14:06 CET 2010


Am 04.11.2010 14:00, schrieb Christian Zenker:
> Hi.
>> My idea was that there is no getRawResult but two distinct query objects,
>> eg query() and dataQuery(). The former would return objects (no grouping features, etc), the latter
>> will return data array (grouping and column functions).
> 
> I don't think this was a good idea. I've built a pager object recently encapsulating everything you
> need to paginate a set of results.
> You basically give it a query and the page you are on and it returns the correct set of data and
> even helps building a pagination in HTML. I would be rather hard (or at least tricky) to keep it as
> simple as it is now when using two different classes for queries. The query given to the object is
> used for a count() as well as for the execute(), so its polymorphic.

Ah I see. For this use case this features comes in handy. But I feel that this dual feature is not a
clean approach. I hope that there is a better way to have an API that is easy to use without tricks.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list