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

[Hotfix] - 유저 정보 수정 시 LazyInitializationException 문제 해결 #56

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

jbw9964
Copy link
Collaborator

@jbw9964 jbw9964 commented Nov 30, 2024

#️⃣연관된 이슈

📝작업 내용

유저 정보 수정시 LazyInitializationException 이 발생하는 버그를 해결하였습니다.

에러가 발생하던 endpoint :

  • POST - /profile, /portfolio : 자신의 기본, 포폴 정보를 등록하는 요청
  • PUT - /user/{userId}/edit : 자신의 프로필 정보를 수정하는 요청

에러 원인 :

Userportfolios, relatedLinks 등이 FetchType.LAZY 로 로딩되지 않은 상태에서 정보를 수정하려 시도해 에러가 발생하였습니다.

해결한 방법 :

portfolios 등을 join fetch 하는 메서드를 통해 User Entity 를 가져오고 정보를 수정하였습니다.

@jbw9964 jbw9964 added 🐞 bug Something isn't working ⛏ fix Bug were fixed labels Nov 30, 2024
@jbw9964 jbw9964 self-assigned this Nov 30, 2024
Copy link

github-actions bot commented Nov 30, 2024

Test Results

14 files  14 suites   14s ⏱️
59 tests 59 ✅ 0 💤 0 ❌
60 runs  60 ✅ 0 💤 0 ❌

Results for commit 4ec9f8c.

♻️ This comment has been updated with latest results.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
68.9% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Collaborator

@kcsc2217 kcsc2217 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 !!!

Copy link
Collaborator

@AnTaeho AnTaeho left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

Copy link
Collaborator

@Leehunil Leehunil left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!!

@jbw9964 jbw9964 merged commit 39fcda8 into develop Dec 2, 2024
3 of 4 checks passed
@jbw9964 jbw9964 deleted the hotfix/user-api-jpa-problem branch December 2, 2024 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working ⛏ fix Bug were fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants