Skip to content

[Hotfix] 메이트 게시글 group by 추가#175

Merged
sete3683 merged 1 commit into
developfrom
hotfix/Mateboard
Apr 14, 2025
Merged

[Hotfix] 메이트 게시글 group by 추가#175
sete3683 merged 1 commit into
developfrom
hotfix/Mateboard

Conversation

@zelly-log
Copy link
Copy Markdown
Collaborator

[Hotfix] 메이트 게시글 group by 추가

🔘 Part

  • BE
  • Infra

🔎 PR Type

  • 새로운 기능 추가
  • 버그 수정
  • 주요 코드 리팩토링(성능 최적화 등)
  • 간단 코드 리팩토링(주석, 코드 컨벤션, 오타 수정 등)
  • 기타 (기타 사항 기입)

🔧 작업 내용 상세 작성

  • [레포 이름 #이슈번호](이슈 주소)

  • 작업 내용을 상세하게 작성해 주세요!

✔️ PR Checklist

  • 커밋 메세지를 컨벤션에 맞게 잘 적용 하였나요?

  • 테스트 코드 작성 / 단위 테스트 or 통합 테스트 진행 하셨나요?

@zelly-log zelly-log added the bug 버그 관련 label Apr 14, 2025
@zelly-log zelly-log requested a review from sete3683 April 14, 2025 01:59
@zelly-log zelly-log self-assigned this Apr 14, 2025
.from(image)
// .where(image.holderType.eq(HolderType.MATEBOARD)
// .and(image.holderId.eq(mate.id)))
.orderBy(image.id.asc())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

103-104행의 코드가 삭제되었습니다. 이 코드는 Mateboard와 관련된 이미지를 조회하는 부분으로 보이는데, 삭제 이유가 명확하지 않습니다. 삭제 전후의 기능 변경 사항을 확인하고, 삭제가 적절한지, 혹은 다른 곳으로 이동되었는지 검토해야 합니다. 만약 더 이상 필요하지 않다면 삭제 이유를 주석으로 명확히 남겨주세요. 단순히 코드 제거만으로는 의도를 파악하기 어렵습니다.

.leftJoin(matePostLike).on(matePostLike.matePost.eq(mate))
.where(builder)
.groupBy(mate.id)
.orderBy(mate.createdAt.desc())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

119행에 .groupBy(mate.id)가 추가되었습니다. 이는 Mateboard 게시글 조회 시 중복된 데이터를 제거하기 위한 것으로 추정됩니다. 하지만 어떤 쿼리의 일부인지, 그리고 이로 인해 발생할 수 있는 성능 저하나 예상치 못한 결과는 없는지 확인해야 합니다. 주변 코드와의 조화를 고려하여, 더 효율적인 방법이 있는지도 검토해 보는 것이 좋겠습니다. 어떤 쿼리의 일부인지 명시적으로 주석을 달아주세요.

@sete3683 sete3683 merged commit 96f7e43 into develop Apr 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 버그 관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants