[TYPO3-mvc] Sort by multiple fields in Repository

Alexander Dick alex at dick.at
Thu Oct 28 10:24:45 CEST 2010


Hi List, 

I just faced the problem that I have to sort on 2 different Fields/Properties in my Repository. 

I have tried it this way, but the second Array seems to have no effect: 

$query
    ->matching($query->in('pid', $storagePids))
    ->setOrderings(
       array(
	    'is_delivered' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING
       ),
       array(
            'crdate' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING
       )
);		

Am I missing something? 

Thanks in advance.
Alex



More information about the TYPO3-project-typo3v4mvc mailing list