[TYPO3-mvc] Using SQL count function in ExtBase query

Martin Kutschker masi-no at spam-typo3.org
Fri Aug 20 09:18:25 CEST 2010


Am 19.08.2010 15:51, schrieb Franz Koch:
> Hey,
> 
>>> $query = $this->createQuery();
>>> return $query->statement('SELECT ...')->execute();
>>>
>>>
>>> If you just like to use the QOM to build such a query (so outside of a
>>> repository) it should be possible, but I can't tell you how as I'm not
>>> too familiar with internals of the QOM layer yet.
>>
>> Hey Franz,
>>
>> thanks for your suggestion, I didn't think about that, but as I cannot
>> use domain objects to be mapped on the results, this will work fine!
> 
> ok, then you can't use the suggestion above, as extbase will try to map the results to a domain
> object (except if you instantiated a custom QOM).

What will it map? The result set contains only a string value and a count. AFAIK the concept the
repository should have (as only part of the system) access to DB if required. The framework should
of course not stand in the way (it should help, not hinder).

Masi


More information about the TYPO3-project-typo3v4mvc mailing list