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.
Goal
설문조사 수정 API를 추가합니다.
Description
ItemOption에 대한 업데이트는 아직 구현이 덜 된 상태라 제외하고 일단 작업된 부분까지 올립니다.
아래와 같은 과정으로 진행되도록 작업했습니다.
Question
도메인과 엔티티가 분리된 상태에서의 과정에 대한 궁금증이 있습니다.
예를 들어, 레이어드 아키텍처에서는 Entity를 불러와서 해당 Entity내에 update 로직을 호출하고 더티체킹으로 업데이트 진행시키는게 일반적인 거 같은데, 도메인과 엔티티가 분리되어 있을 때 도메인 비즈니스 로직을 최대한 사용하려고 했는데 고민되는 상황이 있습니다.
설문조사 업데이트 진행 시
레이어드인 경우 조회 후 변경이라는 간단한 과정이라고 보면, 도메인과 인프라가 분리되어 있을 때는 추가로 도메인 <-> 엔티티 변환과정이 추가되고 도메인 비즈니스 로직을 사용하기 위해 아래처럼 인프라에서 굳이 또 엔티티를 불러오는 추가적인 로직들이 발생을 하는데요. 그렇다고 도메인 레이어에서 비즈니스 로직을 사용하지 않고 surveyRepository로 바로 파라미터 넘겨버리면 DDD가 아니게 되는 느낌이기도 하구요. 보통 어떻게 진행하시나요?