[Hotfix]
- 유저 정보 수정 시 LazyInitializationException
문제 해결
#56
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.
#️⃣연관된 이슈
📝작업 내용
유저 정보 수정시
LazyInitializationException
이 발생하는 버그를 해결하였습니다.에러가 발생하던 endpoint :
POST - /profile, /portfolio
: 자신의 기본, 포폴 정보를 등록하는 요청PUT - /user/{userId}/edit
: 자신의 프로필 정보를 수정하는 요청에러 원인 :
User
의portfolios
,relatedLinks
등이FetchType.LAZY
로 로딩되지 않은 상태에서 정보를 수정하려 시도해 에러가 발생하였습니다.해결한 방법 :
portfolios
등을join fetch
하는 메서드를 통해User
Entity
를 가져오고 정보를 수정하였습니다.