-
Notifications
You must be signed in to change notification settings - Fork 31
한상우 seminar1 과제 #46
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
base: master-week1
Are you sure you want to change the base?
한상우 seminar1 과제 #46
Conversation
PFCJeong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오.. 헤매셨다고 하셨는데 딱히 코멘트 드릴 것이 없을만큼 잘하셨습니다.
주석도 리뷰하는데 많은 도움이되었습니다. 수고하셨씁니다~
| interface AlbumRepository : JpaRepository<AlbumEntity, Long>{ | ||
| // 아티스트 없는 앨범들이 있을까? various artist도 artist? | ||
| @Query("SELECT a FROM albums a " + | ||
| "INNER JOIN FETCH a.artist " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| interface PlaylistLikeRepository : JpaRepository<PlaylistLikesEntity, Long> { | ||
| fun existsByPlaylistIdAndUserId(playlistId: Long, userId: Long): Boolean | ||
| @Transactional | ||
| @Modifying |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Transactional 하나만 있어도 될 것 같습니다.
| import org.springframework.data.jpa.repository.Query | ||
|
|
||
| interface PlaylistGroupRepository: JpaRepository<PlaylistGroupEntity, Long> { | ||
| // 모든 그룹인지 playlists를 가지고 있는 그룹만인지 모르겠어서 일단 left join 만약 playlists가 비어있는 그룹은 제외하고 싶다면 inner join |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
이리 저리 헤매다 코드도 많이 꼬인거 같고 깃도 너무 헤매서 커밋도 이상한걸 많이 해버렸네요
시간이 없어서 추가 과제는 다음에 해보겠습니다