From 8b76fa8ba03f7e7bac685426af736bd612ef516c Mon Sep 17 00:00:00 2001 From: rafacamargo123 Date: Wed, 24 Oct 2018 13:31:14 -0300 Subject: Add ordering comments by id along with creation Order comments correctly when they are added on the same second. --- app/Model/CommentModel.php | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/Model/CommentModel.php b/app/Model/CommentModel.php index ff8d6536..fe43a157 100644 --- a/app/Model/CommentModel.php +++ b/app/Model/CommentModel.php @@ -71,6 +71,7 @@ class CommentModel extends Base ) ->join(UserModel::TABLE, 'id', 'user_id') ->orderBy(self::TABLE.'.date_creation', $sorting) + ->orderBy(self::TABLE.'.id', $sorting) ->eq(self::TABLE.'.task_id', $task_id) ->findAll(); } -- cgit v1.2.3