[TYPO3-mvc] How to set the sort order for child objects (m-m relation)

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Sat Jul 30 03:57:05 CEST 2011


Hello all

I'm writing an extension for the following domain (simplified):

Entities: Hospitals, treatments
Value Objects: disease

Every hospital has several treatments. Every treatment has one disease.

Hospital is "aggregate root".

A simple view which shows all treatments for a particular hospital could 
look like this:

<f:for each="{hospital.treatments}" as="treatment">
     Disease: {treatment.disease.name} Treatments: {treatment.number}
</f:for>

I'd like to sort the results list by disease names.

How can i achieve this?

I know there's the possibility to set orderings for a query obejct.

But in my case there's only one Repository for the aggregate root, 
namely "Hospitals". How to set orderings for subsidiary entities?

Greetings,
T


More information about the TYPO3-project-typo3v4mvc mailing list