Skip to content

Conversation

@navgod
Copy link

@navgod navgod commented Oct 1, 2023

이리 저리 헤매다 코드도 많이 꼬인거 같고 깃도 너무 헤매서 커밋도 이상한걸 많이 해버렸네요
시간이 없어서 추가 과제는 다음에 해보겠습니다

Copy link
Member

@PFCJeong PFCJeong left a 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 " +
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants