From 2380cdbc1cd776f3178739175c5737dfb0ea5842 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Thu, 8 Oct 2015 02:40:42 +0300 Subject: [PATCH] API orderBy() fix. --- src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php b/src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php index d136f3c..67b62b9 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Controller/ApiController.php @@ -25,6 +25,7 @@ class ApiController extends Controller ->select(['se', 'sub']) ->innerJoin('se.subscriber', 'sub') ->where($qb->expr()->eq('se.author', ':author')) + ->orderBy('se.date', 'desc') ->setParameter('author', $user) ->setMaxResults(20) ;