Skip to content

Commit

Permalink
Merge pull request #148 from oduck-team/feature/147
Browse files Browse the repository at this point in the history
주간 인기 애니 조회 쿼리 수정 #147
  • Loading branch information
FaberJoo authored Dec 12, 2023
2 parents 691d028 + 2395eb7 commit 303b070
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ public class GenreRepositoryCustomImpl implements GenreRepositoryCustom{
public List<Genre> findAllByAnimeId(Long animeId) {
JPAQuery<Genre> genreJPAQuery = queryFactory.select(genre)
.from(genre)
.join(animeGenre).on(animeGenre.anime.id.eq(animeId))
.join(animeGenre).on(genre.id.eq(animeGenre.genre.id))
.where(
animeGenre.anime.id.eq(animeId),
genre.deletedAt.isNull()
);
)
.limit(3);
return genreJPAQuery.fetch();
}

Expand Down

0 comments on commit 303b070

Please sign in to comment.