Skip to content

Conversation

@ayoung-dev
Copy link
Collaborator

@ayoung-dev ayoung-dev commented Nov 26, 2024

resolved :

📌 과제 설명

findById 조회 기능 JPA -> QueryDSL

👩‍💻 요구 사항과 구현 내용

✅ PR 포인트 & 궁금한 점

삭제된 게시글의 경우에도 조회가 되어 QueryDSL로 deleted 조건 추가하였습니다.

@ayoung-dev ayoung-dev self-assigned this Nov 26, 2024
@ayoung-dev ayoung-dev changed the title Refactor/51 modify community board get Refactor/51 커뮤니티 게시글 id로 조회 로직 QueryDSL로 변경 Nov 26, 2024
Copy link
Collaborator

@m-a-king m-a-king left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

public interface CommunityBoardRepository {
CommunityBoard save(CommunityBoard communityBoard);
Optional<CommunityBoard> findById(Long id);
Optional<CommunityBoard> getCommunityBoardWithId(Long id);
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. repository에서 find 키워드를 더 많이 사용하지 않나요?
  2. CommunityBoardRepository라면 findById만 사용하면 되지 않나요?
Suggested change
Optional<CommunityBoard> getCommunityBoardWithId(Long id);
Optional<CommunityBoard> findById(Long id);

Copy link
Collaborator

Choose a reason for hiding this comment

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

2번 설명이 좀 부족했는데, get을 사용하더라도

getById()
getWithId() 

로 처리 가능하지 않은지 여쭤본 겁니다!

Copy link
Collaborator

@leebs0521 leebs0521 left a comment

Choose a reason for hiding this comment

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

LGTM!

…getCommunityBoardsByWriterId -> findByWriterId 이름 변경
@sonarqubecloud
Copy link

@ayoung-dev ayoung-dev merged commit 7c4d9f1 into main Nov 26, 2024
2 checks passed
@ayoung-dev ayoung-dev deleted the refactor/51-modify-community-board-get branch November 26, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants