Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: 식재료 이미지 중복 저장 문제 해결 #147

Merged
merged 2 commits into from
Feb 9, 2025

Conversation

ParkJh38
Copy link
Contributor

@ParkJh38 ParkJh38 commented Feb 9, 2025

#️⃣연관된 이슈

#83

📝작업 내용

  • 식재료 이미지 중복 저장 문제 해결
  • 기존에 이미지가 설정되어 있는 식재료의 이미지를 재설정시 기존 s3에 올라간 이미지를 삭제한 후 새로 저장하는 로직 오류 수정

🔎코드 설명 및 참고 사항

  • deleteByIngredientId() 실행 후 즉시 flush()를 호출하여 DB에서 삭제 반영
  • flush() 후 clear()를 호출하여 영속성 컨텍스트 초기화
  • setIngredientImg(null)은 flush() 이후에 실행

💬리뷰 요구사항

@ParkJh38 ParkJh38 added the ♻️ Refactor code refactoring label Feb 9, 2025
@ParkJh38 ParkJh38 self-assigned this Feb 9, 2025
@ParkJh38 ParkJh38 merged commit ea78351 into develop Feb 9, 2025
1 check passed
@ParkJh38 ParkJh38 changed the title Feature/#100 fridge api Refactor: 식재료 이미지 중복 저장 문제 해결 Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ Refactor code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant