Skip to content

Commit

Permalink
!hotfix: 다이어리 삭제 시 칭찬 카드 삭제 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
daeun084 committed Dec 17, 2024
1 parent c2ac15a commit 2df7099
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ public interface ComplimentCardRepository extends JpaRepository<ComplimentCard,

@Query(value = "SELECT c.id " +
"FROM ComplimentCard c " +
"WHERE NOT EXISTS (" +
"WHERE c.user.id = :userId " +
"AND NOT EXISTS (" +
" SELECT 1 " +
" FROM Diary d " +
" WHERE d.complimentCard = c AND d.id = :userId" +
" WHERE d.complimentCard = c" +
")")
List<Long> findByDiaryAndUserId(@Param(value = "userId") Long userId);
}

0 comments on commit 2df7099

Please sign in to comment.