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

Werner Stotter typo3 at itfix.at
Thu Aug 4 16:30:12 CEST 2011


hi,

have you tried setting the 'sorting' in the TCA of ext_tables.php?

in my case this helped

greetings
werner




Am 04.08.2011 15:44, schrieb g4-lisz at tonarchiv.ch:
> 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