[TYPO3-mvc] Sorting based on related objects

Henjo Hoeksma me at henjohoeksma.nl
Tue Dec 27 14:02:21 CET 2011


Hi list,

I know I can sort based on a related object. For example I retrieve persons
and order them based on their position.title (object) within that I sort
them based on their lastname. Works like a charm.

The challenge is for the 2% of the persons that have some special settings:

A person can be assigned to a overridePosition, and even a position can
have a global override position attached.

Now sorting (a.o. used in search results) go wrong when I order the results
based on position.title ASC, lastName ASC because the overrides are not
taken in effect.

I have tried several brainwaves but could't get a ride to the beach of
solutions ;-)

Anyone a suggestion on how to get this solved?

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


More information about the TYPO3-project-typo3v4mvc mailing list