mateboard 이미지 부분 수정#176
Merged
Merged
Conversation
| import static com.frend.planit.domain.mateboard.post.entity.QMatePostLike.matePostLike; | ||
|
|
||
| import com.frend.planit.domain.image.entity.QImage; | ||
| import com.frend.planit.domain.image.type.HolderType; |
There was a problem hiding this comment.
라인 7에서 HolderType import가 추가되었습니다. MateQueryRepositoryImpl에서 이미지를 처리하는 로직에 HolderType을 사용하는 것으로 보입니다. 필요한 import인지 확인하고, HolderType.MATEBOARD 상수의 정의가 명확한지 확인해야 합니다. 상수의 이름이 명확하지 않다면 수정을 고려해야 합니다. 만약 다른 곳에서도 사용되는 상수라면 문제 없겠지만요.
| JPAExpressions | ||
| .select(image.url) | ||
| .from(image) | ||
| .where(image.holderType.eq(HolderType.MATEBOARD) |
There was a problem hiding this comment.
104-105라인에 추가된 코드는 Mateboard 게시글에 연결된 이미지를 가져오는 쿼리로 보입니다. image.holderType.eq(HolderType.MATEBOARD) 부분은 이미지의 소유자가 Mateboard임을 확인하고, image.holderId.eq(mate.id)는 특정 Mateboard ID와 연결된 이미지만 가져오도록 합니다. 이 부분의 쿼리 성능에 대한 검토가 필요합니다. 인덱스가 제대로 설정되어 있는지 확인해야 하고, 필요하다면 쿼리 최적화를 위한 추가 작업이 필요할 수 있습니다. 어떤 필드에 접근하는지 명확하게 보이도록 image 와 mate 객체의 정확한 타입을 주석으로 명시하는 것을 추천합니다. 예를 들어, // image: QImage, mate: QMates 와 같이요.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mateboard 이미지 부분 수정
🔘 Part
🔎 PR Type
🔧 작업 내용 상세 작성
[레포 이름 #이슈번호](이슈 주소)
작업 내용을 상세하게 작성해 주세요!
✔️ PR Checklist
커밋 메세지를 컨벤션에 맞게 잘 적용 하였나요?
테스트 코드 작성 / 단위 테스트 or 통합 테스트 진행 하셨나요?