From 82e883a73c81e9d4a71d241fc58e357a32b3d235 Mon Sep 17 00:00:00 2001 From: mingeun0507 Date: Fri, 26 May 2023 02:04:16 +0900 Subject: [PATCH] =?UTF-8?q?Fix(#171):=20Order=20By=20=EC=95=88=EB=93=A4?= =?UTF-8?q?=EC=96=B4=EA=B0=80=EC=9E=88=EB=8A=94=EA=B1=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project_record/ProjectRecordRepositoryCustomImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/_8attery/seesaw/domain/project_record/ProjectRecordRepositoryCustomImpl.java b/src/main/java/com/_8attery/seesaw/domain/project_record/ProjectRecordRepositoryCustomImpl.java index 88752d4..35a45b8 100644 --- a/src/main/java/com/_8attery/seesaw/domain/project_record/ProjectRecordRepositoryCustomImpl.java +++ b/src/main/java/com/_8attery/seesaw/domain/project_record/ProjectRecordRepositoryCustomImpl.java @@ -34,6 +34,7 @@ public List findAllRecordsByProjectId(Long projectId) .leftJoin(projectQuestion).on(projectRecord.projectQuestion.id.eq(projectQuestion.id)) .fetchJoin() .where(projectRecord.project.id.eq(projectId)) + .orderBy(projectRecord.id.desc()) .fetch(); } @@ -41,6 +42,7 @@ public List findAllRecordsByProjectId(Long projectId) public List findAllByProjectRecordIdList(Long userId, List projectRecordIdList) { return jpaQueryFactory.selectFrom(projectRecord) .where(projectRecord.id.in(projectRecordIdList), projectRecord.project.user.id.eq(userId)) + .fetch(); }