-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat#32] 안건 삭제 개발 #33
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package org.dnd.timeet.agenda.domain; | ||
|
||
public enum AgendaStatus { | ||
PENDING, INPROGRESS, PAUSED, COMPLETED | ||
PENDING, INPROGRESS, PAUSED, COMPLETED, CANCELED | ||
Starlight258 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Starlight258
다음과 같은 경우에 meetingId 값을 찾지 못하여도, Agenda not found가 출력 되게 됩니다.
해당 경우에 findByIdAndMeetingId 메서드를 활용하면서 에러 메시지를 좀 더 의미 있게 어떻게 출력할 수 있을지 궁금합니다☺️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findByIdAndMeetingId
메서드를 사용한다면 에러 메세지로는Meeting or Agenda not found
가 더 명확할 것 같습니다!그런데 그렇게 메세지를 전달하면 Meeting이 존재하지 않은건지 Agenda가 존재하지 않은 건지 응답자 입장에서 모호할 것 같아요! 🧐
코드가 좀 길더라도 각각을 repository에서 조회하고 각 경우에 대해 에러 메세지를 출력하는 코드는 어떻게 생각하세요?
이렇게 작성하면 덜 모호할 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Starlight258
좋은 의견 감사합니다 👍
말씀해주신 방법대로 하면 MeetingId와 AgendaId 중에 어디서 에러가 발생했는지 사용자 입장에서 더욱 명확할 것 같습니다.
다만 걱정되는 점은, repository를 중복으로 두 번 조회함으로써 불필요한 리소스 사용이 없을지 궁금해요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
생각해볼 좋은 질문인것 같아요! 아무래도 단일 조회 메서드는 JPA가 내부적으로 하나의 쿼리를 생성하는데 비해
제안한 코드는 2개의 쿼리를 각각 날리니까요!
메세지를
명확
하게 제공하고 싶다면두번 조회
를,성능
을 중요하게 생각한다면단일 조회
메서드를 선택하는게 좋아보여요!개인적으로,
두번 조회
와단일 조회
가 성능적으로 아주 큰 차이는 없을 것 같아서 전자가 좋을 것 같은데, 어떻게 생각하시나요?