API orderBy() fix.

This commit is contained in:
Alexey Skobkin 2015-10-08 02:40:42 +03:00
parent a429d571a5
commit 2380cdbc1c

View file

@ -25,6 +25,7 @@ class ApiController extends Controller
->select(['se', 'sub']) ->select(['se', 'sub'])
->innerJoin('se.subscriber', 'sub') ->innerJoin('se.subscriber', 'sub')
->where($qb->expr()->eq('se.author', ':author')) ->where($qb->expr()->eq('se.author', ':author'))
->orderBy('se.date', 'desc')
->setParameter('author', $user) ->setParameter('author', $user)
->setMaxResults(20) ->setMaxResults(20)
; ;