Ralf Ralf - 5 months ago 84
MySQL Question

TYPO3 Extbase: setDefaultOrderings in Controller

I have an extension (extbase/fluid) with an main object "Etikett" with a relation to a child object "Land". I want to order my output, so I'm using the setDefaultOrderings method in my Etikett controller, but I got no results, why?

$this->etikettRepository->setDefaultOrderings(array('land.laendername' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING));
$etiketts = $this->etikettRepository->findAll();



Make sure you set the storage pid in your plugins Typoscript or disable the respectStoragePid in your repository.