Issue Feature Closed

#79054Custom Order By Clause

Harald Holzmann 12/20/16, 17:38 updated 03/19/20, 12:45

Description

Hello,

in a Repository I will sort the result by a custom clause. For example I will search the nearest value. For this I calculate the deviation betwenn the values and rank them by this. So the first one will be the result with the nearest value.

For this i have to use prepared statements:
SOME SQL +order by ABS limit 1;

Would be nice if in the repository i could use something like:
$query->setOrderings(
array(
‘ABS’ => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
)
);

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.