diff --git a/src/main/kotlin/kr/hs/dsm/inq/domain/question/persistence/repository/QuestionSetsRepository.kt b/src/main/kotlin/kr/hs/dsm/inq/domain/question/persistence/repository/QuestionSetsRepository.kt index 5b49150..f175045 100644 --- a/src/main/kotlin/kr/hs/dsm/inq/domain/question/persistence/repository/QuestionSetsRepository.kt +++ b/src/main/kotlin/kr/hs/dsm/inq/domain/question/persistence/repository/QuestionSetsRepository.kt @@ -87,11 +87,11 @@ class CustomQuestionSetsRepositoryImpl( private fun JPAQuery.getQuestionSetDto(user: User): MutableList { val author = QUser("writer") - return leftJoin(questionTags).on(questionTags.problems.eq(questionSets.problemId)) + return leftJoin(questionTags).on(questionTags.problems.eq(questionSets.problem)) .leftJoin(tags).on(tags.id.eq(questionTags.id.tagId)) .leftJoin(questionSolvingHistory) - .on(questionSolvingHistory.userId.id.eq(user.id)).on(questionSolvingHistory.problem.eq(questionSets.problemId)) - .innerJoin(author).on(author.id.eq(questionSets.authorId.id)) + .on(questionSolvingHistory.userId.id.eq(user.id)).on(questionSolvingHistory.problem.eq(questionSets.problem)) + .innerJoin(author).on(author.id.eq(questionSets.author.id)) // .rightJoin(favorite).on(favorite.questions.id.eq(questions.id)) // .rightJoin(answers).on(answers.writer.eq(user).and(answers.questions.eq(questions))) .transform( @@ -119,7 +119,7 @@ class CustomQuestionSetsRepositoryImpl( val author = QUser("writer") val liked = QLike("liked") val favorite = QFavorite("favorite") - return@run leftJoin(questionTags).on(questionTags.problems.eq(questionSets.problemId)) + return@run leftJoin(questionTags).on(questionTags.problems.eq(questionSets.problem)) .leftJoin(tags).on(tags.id.eq(questionTags.id.tagId)) .innerJoin(author).on(author.id.eq(questionSets.author.id)) .leftJoin(liked).on(liked.id.userId.eq(user.id)).on(liked.post.eq(questionSets.post))