Open
Conversation
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.
좋은 과제 감사합니다! 아래엔 과제하면서 든 질문들을 몇 가지 적어보았습니다.
AlbumRepository의findAllByTitleKeywordJoinFetch에서join fetch a.artist ar을 지우면 쿼리가 4개로 늘어나는데, 이해가 되지 않습니다ㅠㅠAlbumEntity의artist는FetchType.EAGER이기 때문에join fetch없이 한 번의 쿼리로artist까지 가져올 것이라고 생각했는데 아닌가요?FetchType.EAGER는artist를 가져올 시점에만 관련된 것이고,join fetch로 쿼리를 줄이는 것은 JPQL으로 따로 해결해야 하는 건가요?PlaylistEntity에는group: PlaylistGroupEntity,likeUsers: List<PlaylistLikesEntity>프로퍼티를 추가했지만Playlist에는 추가하지 않았는데, 과제를 하는 데에 문제는 없었습니다. 일반적으로 Entity와 data class의 프로퍼티는 동일하게 하는 것이 좋나요?join fetch를 사용했는데,PlaylistEntity에 OneToMany 관계의 프로퍼티가 2개나 있어서MultipleBagFetchException이 발생했습니다... 다른 분들의 PR과 구글링을 참고하여 songs를 가져오는 쿼리를 따로 분리해 해결했는데, 혹시 더 좋은 방법이 있나요?감사합니다!