aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java')
-rwxr-xr-xsrc/main/java/io/trygvis/esper/testing/core/db/BuildDao.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java b/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java
index 9fdf3f4..e8623f2 100755
--- a/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java
+++ b/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java
@@ -91,7 +91,7 @@ public class BuildDao {
}
public List<BuildDto> selectBuildsByPerson(UUID person, PageRequest page) throws SQLException {
- try (PreparedStatement s = c.prepareStatement("SELECT " + BUILD + " FROM build b, build_participant bp WHERE bp.person=? AND b.uuid = bp.build ORDER BY created_date LIMIT ? OFFSET ?")) {
+ try (PreparedStatement s = c.prepareStatement("SELECT " + BUILD + " FROM build b, build_participant bp WHERE bp.person=? AND b.uuid = bp.build ORDER BY created_date DESC LIMIT ? OFFSET ?")) {
int i = 1;
s.setString(i++, person.toString());
s.setInt(i++, page.count.orSome(10));
@@ -101,7 +101,7 @@ public class BuildDao {
}
public List<BuildDto> selectBuilds(PageRequest page) throws SQLException {
- try (PreparedStatement s = c.prepareStatement("SELECT " + BUILD + " FROM build ORDER BY created_date LIMIT ? OFFSET ?")) {
+ try (PreparedStatement s = c.prepareStatement("SELECT " + BUILD + " FROM build ORDER BY created_date DESC LIMIT ? OFFSET ?")) {
int i = 1;
s.setInt(i++, page.count.orSome(10));
s.setInt(i, page.startIndex.orSome(0));