[TYPO3-mvc] Define a field of a query as a sub query

Matthew Colton mat.colton at web-xs.de
Sat Jul 5 10:04:28 CEST 2014


Hi all,
is the question idiotic, since nobody answered? Feel free to send me a
RTFM, but please answer. :)

Cheers,
Matthew


Am 30.06.2014 07:50, schrieb Matthew Colton:
> Hallo,
> how can a field of a query be defined as a sub query, for example
> SELECT
>   tx_myext_domain_model_eventdate.*,
>   (
>     SELECT SUM(amount)
>     FROM tx_myext_domain_model_reservation
>     WHERE tx_myext_domain_model_reservation.event_date =
>                tx_myext_domain_model_eventdate.uid
>   )
> FROM tx_myext_domain_model_eventdate
> WHERE ...
>
> ATM I'm using a view helper on the eventdate result. That means the
> eventdate result has no SUM() field, but while looping through the
> paginator result I call a viewhelper that does the job. Is there any way
> to do that directly in the query object? Maybe via a getter method in
> the model?




More information about the TYPO3-project-typo3v4mvc mailing list