From 1a5fefd6a1608893f54fa60e035ec650f6ca8e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EB=B2=94?= <72181693+mungmnb777@users.noreply.github.com> Date: Tue, 6 Feb 2024 22:01:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=82=AD=EC=A0=9C=EB=90=9C=20=EB=96=A1?= =?UTF-8?q?=EA=B5=AD=EC=9D=80=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=EC=97=90=20?= =?UTF-8?q?=ED=8F=AC=ED=95=A8=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=B3=80=EA=B2=BD=20(#95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/infra/persistence/SupportRepository.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/tteokguk/tteokguk/support/infra/persistence/SupportRepository.java b/src/main/java/com/tteokguk/tteokguk/support/infra/persistence/SupportRepository.java index ccbe551..29e5ee9 100644 --- a/src/main/java/com/tteokguk/tteokguk/support/infra/persistence/SupportRepository.java +++ b/src/main/java/com/tteokguk/tteokguk/support/infra/persistence/SupportRepository.java @@ -11,6 +11,13 @@ @Transactional public interface SupportRepository extends JpaRepository { - @Query("SELECT s FROM Support s GROUP BY s.supportedTteokguk.id HAVING s.sender.id = :id") + @Query(""" + SELECT s + FROM Support s JOIN FETCH Tteokguk t + ON s.supportedTteokguk.id = t.id + WHERE t.deleted = false + GROUP BY s.supportedTteokguk.id + HAVING s.sender.id = :id + """) List findSupportTteokguks(Long id, Pageable pageable); }