Conversation
* fix: StampService.completeStamp() 트랜잭션 제거 * fix: StampFacade.completeStamp() 트랜잭션 적용
chaiminwoo0223
approved these changes
Oct 12, 2025
Contributor
chaiminwoo0223
left a comment
There was a problem hiding this comment.
고생하셨습니다. 머지 부탁드립니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 작업 내용 및 특이사항
✅ 스탬프 완료 로직 버그 해결
Stamp엔티티의completed필드가false -> true로 업데이트되지 않는 버그가 발생했습니다.StampService.completeStamp()에 트랜잭션이 적용되어 있는데, 트랜잭션 밖에서 조회된Stamp엔티티를 매개변수로 전달받아 업데이트를 수행하고 있었습니다.Stamp는 현재 영속성 컨텍스트에서 관리되지 않는 상태라 더티 체킹이 정상적으로 동작하지 않았습니다.StampService.completeStamp()의 트랜잭션을 제거하고, 상위 로직인StampFacade.completeStamp()에 트랜잭션을 적용해 하나의(동일한) 트랜잭션 내에서 동일한 영속성 컨텍스트로 엔티티가 관리되도록 수정했습니다.StampService.completeStamp()트랜잭션을 유지하고, 매개변수로 ID를 받아 해당 메서드에서 직접 엔티티를 조회하고 업데이트하는 방법도 있었지만 코드의 수정과 변경 범위를 생각해 위의 방법을 사용했습니다.🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)