summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-02 18:53:35 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-02 18:53:35 -0400
commit9bc82296a93c348c376a7db472be1612f1785c3f (patch)
treeb7bd5d06bd6c04f633559629c6b001997eb0e3ef /app/Model
parenta8a8bfb0afdd105980181a5fa11701028ff5adfe (diff)
Force sorting order in SQL for Postgres
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/TaskFinderModel.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Model/TaskFinderModel.php b/app/Model/TaskFinderModel.php
index af39b924..0e8585ea 100644
--- a/app/Model/TaskFinderModel.php
+++ b/app/Model/TaskFinderModel.php
@@ -166,6 +166,7 @@ class TaskFinderModel extends Base
->table(TaskModel::TABLE)
->eq(TaskModel::TABLE.'.project_id', $project_id)
->eq(TaskModel::TABLE.'.is_active', $status_id)
+ ->asc(TaskModel::TABLE.'.id')
->findAll();
}
@@ -183,7 +184,8 @@ class TaskFinderModel extends Base
->table(TaskModel::TABLE)
->eq(TaskModel::TABLE.'.project_id', $project_id)
->in(TaskModel::TABLE.'.is_active', $status)
- ->findAllByColumn('id');
+ ->asc(TaskModel::TABLE.'.id')
+ ->findAllByColumn(TaskModel::TABLE.'.id');
}
/**