Ralf Ralf - 24 days ago 23
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();


Relation

Answer

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

=)

Comments