[TYPO3-mvc] sort order of related objects?

Andreas Ofner andreaso.typo3 at gmail.com
Wed May 26 14:53:23 CEST 2010


Hello,

i am currently working on a simple "Project / Portfolio" extension.
It simply consists of a "Project" domain-model and a "Picture" 
domain-model. Several images can be assigned to a project (0. * 
relationship) and "Project" is my "aggregate-root".
Both database-tables have a "sorting" column [1] to manually set
the sort order in the Backend.

To get the projects in the correct sort order i used 
"Tx_Extbase_Persistence_Query::ORDER_ASCENDING" in the "findAll()" 
method of the "ProjectRepository".

But i can not figure out how / where to set the order of the
assigned pictures to get the expected output using:
<f:for each="{project.pictures}" as="picture">...</f:foreach>

Regards,
Andreas

[1] like an "old style" pi based Extension


More information about the TYPO3-project-typo3v4mvc mailing list