임혜진 seminar1 과제#43
Open
hjlim7831 wants to merge 10 commits into
Open
Conversation
Member
|
안녕하세요. 지금 실패하는 테스트들 몇 개 있습니다. (2)에서 질문 주신 내용 때문인 것 같은데요.
|
Author
|
@transactional을 추가했습니다! |
PFCJeong
approved these changes
Oct 21, 2023
| val playlistGroupEntities = playlistGroupRepository.findAllOpenWithJoinFetch() | ||
|
|
||
| return playlistGroupEntities | ||
| .map { PlaylistGroup( |
Member
There was a problem hiding this comment.
이쁘게 개행하면 좋을 것 같습니다.
it, it2로 명시하는 것보다는 의미가 보이는 이름을 붙여주는게 가독성이 좋아질 것 같아요
| user = UserEntity(id = userId) | ||
| )) | ||
| } | ||
| @Transactional |
Member
There was a problem hiding this comment.
@Transactional 잘 붙여주셨는데요. 트랜잭션의 범위는 작으면 작을 수록 좋습니다.
deleteByPlaylistIdAndUserId()에 트랜잭션을 붙여주셨기 때문에 요기에는 없어도 될 거 같아요.
|
|
||
| sealed class CacheException : RuntimeException() | ||
|
|
||
| class CacheMissException : CacheException() No newline at end of file |
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.
/api/v1/playlists/{id} API를 구현할때, MultipleBagFetchException을 피하기 위해 playlist에 포함된 song들의 id들을 리스트로 뽑아 인자로 넘겨주고 WHERE ~ IN으로 query를 날렸는데 좋은 방법인지 모르겠습니다.
테스트를 작성하고 같은 클래스 내에 있는 모든 테스트를 실행시켰을 때 테스트 간에 서로 영향을 주던데, 원래 그런건가요?