boogi-on-and-on / boogi-api-server

2 stars 0 forks source link

커뮤니티에 작성된 글 조회시 에러 발생 #5

Closed yjlee0235 closed 2 years ago

yjlee0235 commented 2 years ago

OSIV가 false일 때 CommunityApiController에 getPosts가 실행되는데 해당 클래스의 180 라인에서 PostOfCommunity dto를 생성하는 도중에 PostMedia를 lazy init해서 no session 에러 발생함.

sdcodebase commented 2 years ago

LAZY INIT할 때, 객체 내부에 접근해야하는데 해당 부분이 제외되었음 map으로 하는게 아니라 실제 객체를 find하면 된다.