Use created_at as default sort

Imported content use the real creation date. If we sort by id, it'll
display contents in reverse order.
This commit is contained in:
Jeremy Benoist 2016-11-04 07:34:37 +01:00
parent 84795d015b
commit ce11952447
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C

View file

@ -22,7 +22,7 @@ class EntryRepository extends EntityRepository
return $this->createQueryBuilder('e')
->leftJoin('e.user', 'u')
->andWhere('u.id = :userId')->setParameter('userId', $userId)
->orderBy('e.id', 'desc')
->orderBy('e.createdAt', 'desc')
;
}