Sfoglia il codice sorgente

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

bastien 13 anni fa
parent
commit
4962af9246
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/Muzich/CoreBundle/Repository/ElementRepository.php

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

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