From 7ddfa9a195259e52c2eedb5180bb7169ca93bb75 Mon Sep 17 00:00:00 2001 From: Simon Backx <simon@ghost.org> Date: Fri, 12 Aug 2022 14:49:43 +0200 Subject: [PATCH] Readded limit to replies relation no issue Was accidentally committed with previous commit. --- ghost/core/core/server/models/comment.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghost/core/core/server/models/comment.js b/ghost/core/core/server/models/comment.js index 165ccf8ddc..2ed0e63e77 100644 --- a/ghost/core/core/server/models/comment.js +++ b/ghost/core/core/server/models/comment.js @@ -52,7 +52,9 @@ const Comment = ghostBookshelf.Model.extend({ replies() { return this.hasMany('Comment', 'parent_id', 'id') - .query('orderBy', 'created_at', 'ASC'); + .query('orderBy', 'created_at', 'ASC') + // Note: this limit is not working + .query('limit', 3); }, emitChange: function emitChange(event, options) {