Skip to content

Commit

Permalink
[FIX] JPA 메소드 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
thguss committed Feb 18, 2024
1 parent f9ad834 commit 8ea47c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private void restoreAttendances(List<Attendance> attendances) {
private void deleteRelationship(Lecture lecture) {
subAttendanceRepository.deleteAllBySubLectureIn(lecture.getSubLectures());
subLectureRepository.deleteAllByLecture(lecture);
attendanceRepository.deleteAllByLecture(lecture);
attendanceRepository.deleteByLecture(lecture);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@

public interface AttendanceRepository extends JpaRepository<Attendance, Long>, AttendanceCustomRepository {
Optional<Attendance> findByLectureAndMember(Lecture lecture, Member member);
@Query("delete from Attendance a where a.lecture = :lecture")
void deleteAllByLecture(Lecture lecture);
void deleteByLecture(Lecture lecture);
}

0 comments on commit 8ea47c1

Please sign in to comment.