From dbbce5036587525180f71b991d824a6f303a9daf Mon Sep 17 00:00:00 2001 From: tjdals4716 Date: Fri, 1 Nov 2024 22:22:42 +0900 Subject: [PATCH] =?UTF-8?q?:white=5Fcheck=5Fmark:=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20cascade=20=EA=B5=AC=ED=98=84=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C,=20=EB=82=9C=20JPA=EA=B0=80=20=EC=8B=AB=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/moyeothon/Repository/BucketRepository.java | 2 +- .../com/example/moyeothon/Repository/MessageRepository.java | 1 - src/main/java/com/example/moyeothon/Service/UserService.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/example/moyeothon/Repository/BucketRepository.java b/src/main/java/com/example/moyeothon/Repository/BucketRepository.java index 277b132..01d4b3b 100644 --- a/src/main/java/com/example/moyeothon/Repository/BucketRepository.java +++ b/src/main/java/com/example/moyeothon/Repository/BucketRepository.java @@ -11,5 +11,5 @@ public interface BucketRepository extends JpaRepository { List findByUser_Uid(String uid); List findByTitleContainingIgnoreCaseOrContentContainingIgnoreCase(String title, String content); - void deleteByUser_Uid(String uid); + void deleteByUserUid(String uid); } diff --git a/src/main/java/com/example/moyeothon/Repository/MessageRepository.java b/src/main/java/com/example/moyeothon/Repository/MessageRepository.java index 6c6fb34..7d78696 100644 --- a/src/main/java/com/example/moyeothon/Repository/MessageRepository.java +++ b/src/main/java/com/example/moyeothon/Repository/MessageRepository.java @@ -10,7 +10,6 @@ public interface MessageRepository extends JpaRepository { List findBySenderUid(String senderId); List findByReceiverUid(String receiverId); List findByContentContainingIgnoreCase(String keyword); - void deleteByBucketListId(Long bucketListId); void deleteBySenderUid(String uid); void deleteByReceiverUid(String uid); } diff --git a/src/main/java/com/example/moyeothon/Service/UserService.java b/src/main/java/com/example/moyeothon/Service/UserService.java index 2a7e61c..1505fbe 100644 --- a/src/main/java/com/example/moyeothon/Service/UserService.java +++ b/src/main/java/com/example/moyeothon/Service/UserService.java @@ -116,7 +116,7 @@ public UserDTO deleteUser(String uid, UserDetails userDetails) { if (userEntity == null) { throw new RuntimeException("해당 유저가 존재하지 않습니다."); } - bucketRepository.deleteByUser_Uid(uid); + bucketRepository.deleteByUserUid(uid); messageRepository.deleteBySenderUid(uid); messageRepository.deleteByReceiverUid(uid); userRepository.delete(userEntity);