HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
♥️
2기 최종 프로젝트 팀별 공간
/
[팀 09] 오프와 에프
[팀 09] 오프와 에프
/
QueryDsl에서 fetchJoin 불가능 이슈

QueryDsl에서 fetchJoin 불가능 이슈

작성일시
Aug 3, 2022 09:54 AM
최종 편집일시
Aug 4, 2022 07:49 AM
회의 유형
작성자
참석자
[QueryDSL] 에러 발생 - query specified join fetching, but the owner of the fetched association was not present in the select list
발생 에러 org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement { explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias= board,role=com.teamproj.backend.model.board.BoardLike.board, tableName=board,tableAlias=board1_, origin=board_like boardlike0_, columns={boardlike0_.board_board_id, className=com.teamproj.backend.model.board.Board } } ] select board.boardId, board.thumbNail, board.title, user.nickname, count(boardLike.board) as c from com.teamproj.backend.model.board.BoardLike boardLike left join fetch boardLike.board as board left join fetch boardLike.user as user where board.boardCategory = ?1 and boardLike.createdAt between ?2 and ?3 group by boardLike.board order by c desc 인용문은 복사 붙여넣기 할 때 엔터가 적용이 안 돼서 자바 코드블럭으로 올리는 점 양해 바란다.....
[QueryDSL] 에러 발생 - query specified join fetching, but the owner of the fetched association was not present in the select list
https://dazbee.tistory.com/84
[QueryDSL] 에러 발생 - query specified join fetching, but the owner of the fetched association was not present in the select list
 
dto로 바로 반환시 불가능하다고합니다.