Skip to content

Commit

Permalink
fix: nullifyPhoto() 호출 후 flush()를 통해 해당 변경사항 DB에 즉시 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
bflykky committed Aug 20, 2024
1 parent ab77f75 commit 0abf638
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.umc.naoman.global.error.BusinessException;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
Expand Down Expand Up @@ -53,5 +54,6 @@ public void nullifyPhotoInAgendaPhotoList(List<Long> photoIdList) {
List<AgendaPhoto> agendaPhotoList = agendaPhotoRepository.findByPhotoIdIn(photoIdList);
agendaPhotoList
.forEach(AgendaPhoto::nullifyPhoto);
agendaPhotoRepository.flush();
}
}

0 comments on commit 0abf638

Please sign in to comment.