I have an item
object with an 1:n relation to categories
.
Lets say categories is a numeric value.
I tried to sort all items as per categories with setOrderings() but it doesn't work.
//inside findAll() in my ItemRepository
$query->setOrderings(array("item.categories" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING));
How can i get my query to sort all items according to their child objects categories
?
EDIT: Example
Item1 has categories[1,2,8], Item2 has categories[1,2,5] so the ascending sort order would be: Item2, Item1