Browse Source

Récupération des Elements: rangés par created (timestamppable).

bastien 13 years ago
parent
commit
4962af9246
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Muzich/CoreBundle/Repository/ElementRepository.php

+ 2 - 2
src/Muzich/CoreBundle/Repository/ElementRepository.php View File

91
         SELECT e FROM MuzichCoreBundle:Element e
91
         SELECT e FROM MuzichCoreBundle:Element e
92
         JOIN e.owner u
92
         JOIN e.owner u
93
         WHERE u.id = :uid
93
         WHERE u.id = :uid
94
-        ORDER BY e.id DESC'
94
+        ORDER BY e.created DESC'
95
       )
95
       )
96
       ->setParameter('uid', $user_id)
96
       ->setParameter('uid', $user_id)
97
       ->setMaxResults($limit)
97
       ->setMaxResults($limit)
114
         JOIN e.owner u
114
         JOIN e.owner u
115
         JOIN e.group g
115
         JOIN e.group g
116
         WHERE g.id = :gid
116
         WHERE g.id = :gid
117
-        ORDER BY e.id DESC'
117
+        ORDER BY e.created DESC'
118
       )
118
       )
119
       ->setParameter('gid', $group_id)
119
       ->setParameter('gid', $group_id)
120
       ->setMaxResults($limit)
120
       ->setMaxResults($limit)