Skip to content

Commit

Permalink
fix: 삭제된 떡국은 리스트에 포함되지 않도록 변경 (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
mungmnb777 authored Feb 6, 2024
1 parent c17071d commit 1a5fefd
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
@Transactional
public interface SupportRepository extends JpaRepository<Support, Long> {

@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<Support> findSupportTteokguks(Long id, Pageable pageable);
}

0 comments on commit 1a5fefd

Please sign in to comment.