aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/trygvis/esper/testing/core/db/PersonDao.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/trygvis/esper/testing/core/db/PersonDao.java')
-rwxr-xr-xsrc/main/java/io/trygvis/esper/testing/core/db/PersonDao.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/core/db/PersonDao.java b/src/main/java/io/trygvis/esper/testing/core/db/PersonDao.java
index 3288b56..ec1620b 100755
--- a/src/main/java/io/trygvis/esper/testing/core/db/PersonDao.java
+++ b/src/main/java/io/trygvis/esper/testing/core/db/PersonDao.java
@@ -95,7 +95,7 @@ public class PersonDao {
}
public List<PersonDto> selectPersons(PageRequest pageRequest) throws SQLException {
- try (PreparedStatement s = c.prepareStatement("SELECT " + PERSON + " FROM person ORDER BY created_date, name LIMIT ? OFFSET ?")) {
+ try (PreparedStatement s = c.prepareStatement("SELECT " + PERSON + " FROM person ORDER BY created_date DESC, name LIMIT ? OFFSET ?")) {
int i = 1;
s.setInt(i++, pageRequest.count.orSome(10));
s.setInt(i, pageRequest.startIndex.orSome(0));