Skip to content
Discussion options

You must be logged in to vote

안녕하세요, 질문에 답변이 늦어 죄송합니다.

참고로, 코드를 공유해주실 때는 스크린샷보다는 복붙이 가능한 방식으로 올려주시면 좋습니다.

@Query ("SELECT s FROM songs S " +
        "LEFT JOIN FETCH s.album a " +
        "LEFT JOIN FETCH s. song_artists sa "
        "LEFT JOIN FETCH sa.artist " +
        "WHERE s.id IN :idList")
fun findAliByIDListJoinFetch(idList: List<Long>): List<SongEntity>

위와 같이 markdown 문법(```kotlin)을 이용하여 Kotlin 문법 하이라이트를 하면서 코드를 예쁘게 공유할 수 있답니다. 복잡한 질문의 경우, 재현이 가능하도록 본인 repo 의 특정 branch 에 push 해두시고 링크를 걸어주셔도 좋습니다. 갈수록 과제가 복잡해지면서 개인마다 설계 상황 등이 다를 수 있어서 답변하는 입장에서 상황을 이해하기 어려울 수 있거든요.


  1. 엄밀히 말해, JPA 의 연관관계에서 Eager, Lazy 가 N+1 문제를 일으키는 것과 직결되지는 않습니다. 관련은 있지만요. Eager 로 해도, Lazy 로 해도, 상황에 따라 N+1 문제는 발생할 수 있습니다. Eager 와 Lazy 의 구분에서 중…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DoohyunHwang97
Comment options

Answer selected by DoohyunHwang97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Spring Spring 관련 내용
2 participants