[TYPO3-mvc] foreign_sortby messes up fields

Christian Kartnig office at hahnepeter.de
Fri Oct 7 23:03:40 CEST 2011


Am 07.10.2011 15:31, schrieb Franz Koch:
> Hey,
>
>> > AFAIK the foreign_sortby does not work with extbase yet;
>>
>> I think it is implemented. At least the sorting gets set in
>> DataMapFactory->setOneToManyRelation() and the columns also get sorted
>> correctly. Just when I add an object via the controller, the field
>> specified in foreign_sortby gets overwritten by the sorting numbers
>> (1,2,3,...)
>
> you mean, the defined "foreign_sortby" field does not contain sorting
> numbers but f.e. a string that's used for the sorting and is then
> overwritten by a sorting integer value? If so, that's the correct
> behavior, because the field defined by "foreign_sortby" is used to STORE
> the TYPO3 sorting values for manual sorting and is NOT used as a
> "default sortby". So if you just need a default sorting this is the
> wrong option. As Frank mentioned, a default sortby is not yet fully
> supported everywhere IIRC.
>

Hi Franz,

Thanks for clarifying this! I really got that wrong.
Although it's a pity that a default sorting is not supported. It makes 
the ORM with its aggregate roots a lot less useful.

Best regards,
Christian


More information about the TYPO3-project-typo3v4mvc mailing list