fix [#76] ArtistResolver의 load 함수에서 target이 리스트 타입인 경우 탐색 가능하도록 수정 #77
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.
✨ Issue Number ✨
closes #76
✨ To-do ✨
✨ Description ✨
load 함수의 target 변수가 리스트 타입인 경우 target.getClass()의 결과가 ArrayList 클래스입니다.
반대로 load 함수에서 리플렉션을 사용해 필드 값을 순회하다 Field 변수가 리스트 타입인 경우 field.getType()의 결과가 List.class 입니다.
부모 인터페이스를 찾아보는 방법으로 해결할 수 있을 것 같지만, 성능 최적화, 구현 난이도가 높다고 생각해 스프린트에 구현하기로 결정했습니다.
현재는 ArrayList.class, List.class 모두 mapper에 등록했습니다.
load 함수에 현재 타입이 리스트인 경우 처리하도록 구현했습니다.