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.
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
Week1 step3 #724
base: sanghou
Are you sure you want to change the base?
Week1 step3 #724
Changes from 1 commit
f9d6204
0048d9c
f6c7aac
5719092
ad987a4
b7147a1
2d2c49f
f38468d
54e05c1
a2176c4
4eb3fe1
1ed21d6
59c4c8e
33eeb02
7a87a68
93a2671
32d0bde
155cf3d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
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.
메서드 체이닝으로인한 디미터의 법칙을 지키지 못하는 문제는
Station에 public class로 equals를 정의해서 equals의 대상으로 id만 쓰고 있다는 정보도 숨겼는데 이런 접근 방식을 시도해보는 것을 말씀해주신 것이 맞을까요?
혹시 다른 방법들이 추가로 있을까요?
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.
같은 Resource(ex: id)인데 어디선 id 어디선 lineId라고 이름을 다르게 지을 필요가 있을까요?!
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.
엄밀히 말해 구간 서비스는 필요 없는 서비스 계층입니다. 왜일까요?
구간정보는 결국 노선정보에 종속되며 같은 라이프사이클을 가져가는 엔티티라는게 힌트입니다.
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.
아하! 애초에 순환 참조가 발생한 이유도 같이 동작해야하는 로직이었기 때문이겠네요!
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.
이렇게 된다면 LineService에서 Section 저장을 위해서 SectionRepository를 참조하게 될텐데
괜찮은 방법일까요?
구간이라는 개념이 노선에 종속적이기 때문에 구간 조회에 대한 책임도 노선 서비스가 담당하는게 맞을까요?