Skip to content

Commit

Permalink
강의평 없는 강의 조회 불가 버그 픽스
Browse files Browse the repository at this point in the history
  • Loading branch information
Hank-Choi committed Apr 18, 2024
1 parent a0658c5 commit cae0d99
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class LectureRepositoryImpl(private val queryFactory: JPAQueryFactory) : Lecture
.leftJoin(lecture.semesterLectures, semesterLecture)
.leftJoin(semesterLecture.evaluations, lectureEvaluation)
.groupBy(lecture)
.where(*predicates, lectureEvaluation.isHidden.eq(false))
.where(*predicates, lectureEvaluation.isNull.or(lectureEvaluation.isHidden.eq(false)))
.offset(pageable.offset).limit(pageable.pageSize.toLong()).fetch()

val total = queryFactory.select(
Expand Down Expand Up @@ -101,7 +101,7 @@ class LectureRepositoryImpl(private val queryFactory: JPAQueryFactory) : Lecture
).from(lecture)
.innerJoin(lecture.semesterLectures, semesterLecture)
.leftJoin(semesterLecture.evaluations, lectureEvaluation)
.where(lecture.id.`in`(lectureSubQuery.map { it.id }), lectureEvaluation.isHidden.eq(false))
.where(lecture.id.`in`(lectureSubQuery.map { it.id }), lectureEvaluation.isNull.or(lectureEvaluation.isHidden.eq(false)))
.groupBy(lecture)
.fetch()

Expand Down

0 comments on commit cae0d99

Please sign in to comment.