From 8ea47c170ba175caf533a35d0c52a21ee1df0bbb Mon Sep 17 00:00:00 2001 From: thguss Date: Sun, 18 Feb 2024 22:55:53 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20JPA=20=EB=A9=94=EC=86=8C=EB=93=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operation/web/lecture/service/WebLectureServiceImpl.java | 2 +- .../attendance/repository/attendance/AttendanceRepository.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/operation-api/src/main/java/org/sopt/makers/operation/web/lecture/service/WebLectureServiceImpl.java b/operation-api/src/main/java/org/sopt/makers/operation/web/lecture/service/WebLectureServiceImpl.java index a350ff54..c11adc30 100644 --- a/operation-api/src/main/java/org/sopt/makers/operation/web/lecture/service/WebLectureServiceImpl.java +++ b/operation-api/src/main/java/org/sopt/makers/operation/web/lecture/service/WebLectureServiceImpl.java @@ -193,7 +193,7 @@ private void restoreAttendances(List attendances) { private void deleteRelationship(Lecture lecture) { subAttendanceRepository.deleteAllBySubLectureIn(lecture.getSubLectures()); subLectureRepository.deleteAllByLecture(lecture); - attendanceRepository.deleteAllByLecture(lecture); + attendanceRepository.deleteByLecture(lecture); } } diff --git a/operation-domain/src/main/java/org/sopt/makers/operation/attendance/repository/attendance/AttendanceRepository.java b/operation-domain/src/main/java/org/sopt/makers/operation/attendance/repository/attendance/AttendanceRepository.java index e8741851..01bdf46e 100644 --- a/operation-domain/src/main/java/org/sopt/makers/operation/attendance/repository/attendance/AttendanceRepository.java +++ b/operation-domain/src/main/java/org/sopt/makers/operation/attendance/repository/attendance/AttendanceRepository.java @@ -10,6 +10,5 @@ public interface AttendanceRepository extends JpaRepository, AttendanceCustomRepository { Optional findByLectureAndMember(Lecture lecture, Member member); - @Query("delete from Attendance a where a.lecture = :lecture") - void deleteAllByLecture(Lecture lecture); + void deleteByLecture(Lecture lecture); }