Feat: DIR Entity, Repository, Test 추가 (연관관계 매핑 전)#8
Merged
Conversation
Contributor
Author
|
추가 할 로직
|
Contributor
Author
|
getSingleResult() 는 다른 레이어에서 예측 불가능한 예외를 발생시킬 위험이 존재 |
금일 회의 결과에 따른 service layer 생성 전 setter 추가 금지 및 단일 레코드 조회 시 getSingleResult 는 다수의 Exception handling 이 필요하기 때문에 Optional 을 반환할 수 있는 패턴으로 수정했습니다.
Open
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.
DIR Entity, Repository, Test 추가하였습니다.
Repository 는 생성, 조회만 추가하였고, 현재 PageInDIR, UnitInDIR 연관관계 매핑은 포함되어 있지 않습니다.
기존 설계에서 한 가지 수정한 것은 클라이언트에게 제공될 탐색 경로가 필요하다고 판단되어 path 를 추가했습니다.
부모 DIR 이 /root/parentDIR 의 경로에 존재하고, 해당 경로에 sample.unit 을 추가하고 싶다면
parent path : /root/
parent DIR Name : parentDIR
child path : parent path + parent DIR Name + "/"
child unit name : sample
이 됩니다.
모든 DIR 내 조회 생성 로직은 create(child path, child unit name) 로 이루어져 있습니다.