From 6b81a22d6fc132dc5c85f7b8d06cd9e74fb69968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A0=95=EB=AF=BC?= Date: Thu, 8 Aug 2024 16:10:45 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20qna=20=EC=A1=B0=ED=9A=8C=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 --- .../com/edufocus/edufocus/qna/repository/QnaRepository.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/main/java/com/edufocus/edufocus/qna/repository/QnaRepository.java b/backend/src/main/java/com/edufocus/edufocus/qna/repository/QnaRepository.java index 9d1c71e..19ebbcd 100644 --- a/backend/src/main/java/com/edufocus/edufocus/qna/repository/QnaRepository.java +++ b/backend/src/main/java/com/edufocus/edufocus/qna/repository/QnaRepository.java @@ -14,5 +14,7 @@ import java.util.List; public interface QnaRepository extends JpaRepository { List findByLectureId(Long lecturerId); + + @Query("SELECT q FROM Qna q WHERE q.lecture.id = :lectureId ORDER BY q.createdAt DESC") Page findByLectureId(Long lectureId, Pageable pageable); }