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

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Thu Aug 4 15:44:44 CEST 2011


On 30.07.2011 03:57, g4-lisz at tonarchiv.ch wrote:
> 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
Really no one any idea?

I think this is a quit common problem and there must be a common solution?

Any help will be much appreciated!



More information about the TYPO3-project-typo3v4mvc mailing list