[TYPO3-english] extbase findAll() default_sortby

Henjo Hoeksma | Stylence me at henjohoeksma.nl
Tue Jul 30 16:12:02 CEST 2013


Hi Muriel,

the link you provide to Forge explains exactly how to set defaultOrderings
in the repository.
The stuff you put in the TCA Array are pure for the Backend and Extbase
does not look there. These are two separate things.

Hope this makes it a little more clear ;-)

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.


On Tue, Jul 30, 2013 at 3:28 PM, Muriel le Pair <typo3 at strangefruit.nl>wrote:

> Hi,
>
> I would like findAll() to order by they default_sortby set in the TCA, but
> it doesn't work.
> How are you expected to sort a query in extbase?
>
> In ext_tables.php both sortby and default_sortby have been set to the
> sorting field.
>
> 'sortby' => 'sorting',
> 'default_sortby' => 'ORDER BY sorting',
>
> I would expect that findAll() would use this settings, but somehow they
> are ignored.
>
> I have been looking at http://forge.typo3.org/**projects/typo3v4-mvc/wiki/
> **Default_Orderings_and_Query_**Settings_in_Repository<http://forge.typo3.org/projects/typo3v4-mvc/wiki/Default_Orderings_and_Query_Settings_in_Repository>and
> http://api.typo3.org/extbase/**current/TYPO3/CMS/Extbase/**
> Persistence/Generic/class-**Typo3QuerySettings.html<http://api.typo3.org/extbase/current/TYPO3/CMS/Extbase/Persistence/Generic/class-Typo3QuerySettings.html>but the odd thing is that I can't find any options to order by.
>
>
> So in good old plain mysql: SELECT * from mytable ORDER BY sorting asc.
>
> --
> kind regards,
>
> Muriel le Pair
> ______________________________**_________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**english<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english>
>


More information about the TYPO3-english mailing list