[TYPO3-mvc] Sort by multiple fields in Repository
Alexander Dick
alex at dick.at
Thu Oct 28 10:33:18 CEST 2010
Alright, got it working:
->setOrderings(
array(
'is_delivered' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING,
'crdate' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING
)
);
Thanks anyways! :-)
On Thu, 28 Oct 2010 10:24:45 +0200, Alexander Dick <alex at dick.at> wrote:
>
> 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
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list