Skip to content

Comments

fix: Delete 호출 후 flush 수행#315

Merged
JanooGwan merged 1 commit intodevelopfrom
fix/cant-withdraw
Feb 23, 2026
Merged

fix: Delete 호출 후 flush 수행#315
JanooGwan merged 1 commit intodevelopfrom
fix/cant-withdraw

Conversation

@JanooGwan
Copy link
Contributor

@JanooGwan JanooGwan commented Feb 23, 2026

🔍 개요

  • close #이슈번호

🚀 주요 변경 내용


💬 참고 사항


✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

@JanooGwan JanooGwan requested a review from Copilot February 23, 2026 17:19
@JanooGwan JanooGwan self-assigned this Feb 23, 2026
@JanooGwan JanooGwan added the 버그 정상적으로 동작하지 않는 문제 상황 관련 이슈입니다. label Feb 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

이 PR은 사용자 삭제 시 데이터베이스 동기화를 개선하기 위해 deleteUser 메서드에 flush() 호출을 추가합니다.

Changes:

  • UserRepositoryflush() 메서드 선언 추가
  • deleteUser 메서드에서 delete() 호출 직후 flush() 호출을 추가하여 데이터베이스 제약 조건 위반을 즉시 감지
  • @Transactional 어노테이션에 명시적으로 readOnly = false 추가

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
UserRepository.java Repository 인터페이스에 flush() 메서드 선언 추가 (Spring의 기본 Repository 인터페이스는 이 메서드를 제공하지 않으므로 명시적 선언 필요)
UserService.java deleteUser 메서드에 flush() 호출 추가 및 트랜잭션 속성 명시

}

@Transactional
@Transactional(readOnly = false)
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Transactional 어노테이션은 기본적으로 readOnly = false입니다. 명시적으로 readOnly = false를 지정하는 것은 불필요합니다. 클래스 레벨에서 @Transactional(readOnly = true)가 선언되어 있어 메서드 레벨에서 오버라이드가 필요하지만, @Transactional만 사용해도 충분합니다.

Suggested change
@Transactional(readOnly = false)
@Transactional

Copilot uses AI. Check for mistakes.
@JanooGwan JanooGwan merged commit ced8a53 into develop Feb 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

버그 정상적으로 동작하지 않는 문제 상황 관련 이슈입니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant