[TYPO3-mvc] Sort query results by a sub-model property

Marc Bastian Heinrichs typo3 at mbh-web.de
Wed Feb 9 12:36:19 CET 2011


Hey,

> Still facing the problem and not sure
> how to solve it in an appropriate way.
> 
> Is it somehow possible to order objects
> by a sub-object's property?
> 
> In detail, I want to order Projects by
> their newest product.
> 
> But using the project repository, creating
> an own method and sorting by 'products.date'
> doesn't seem to work properly.
> 
> It seems ordering is done, but it only
> used the date of the first product of
> each project.

Could you debug the resulting query in
Tx_Extbase_Persistence_Storage_Typo3DbBackend::getObjectDataByQuery
and post it? Thx

Best
Marc Bastian



More information about the TYPO3-project-typo3v4mvc mailing list