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); }