[Spring]JPQL 질문 #165
Answered
by
PFCJeong
DoohyunHwang97
asked this question in
Q&A
[Spring]JPQL 질문
#165
-
Beta Was this translation helpful? Give feedback.
Answered by
PFCJeong
Oct 1, 2023
Replies: 1 comment 1 reply
-
안녕하세요~ 좋은 질문 많이 남겨주셨네요.
@Query("""
SELECT s FROM songs s
JOIN FETCH s.album al
JOIN FETCH s.artists sa
JOIN FETCH sa.artist
WHERE s.title LIKE %:keyword%
""")
감사합니다. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
DoohyunHwang97
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
안녕하세요~ 좋은 질문 많이 남겨주셨네요.
a.image, ar.name
만 조회하는 것이 아니고 album과 artist의 모든 칼럼들을 전부 다 조회합니다.albums.image만 조회해왔다고 했을 때,
song(SongEntity).album(AlbumEntity).title
는 비어있게 되기 때문입니다.…