-
Notifications
You must be signed in to change notification settings - Fork 45
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
2단계 - Proxy #125
base: yangseungin
Are you sure you want to change the base?
2단계 - Proxy #125
Conversation
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.
안녕하세요 승인님!
미션 2단계 리뷰요청 주셨는데 요구사항이 진행이 안되어있네요 😢
미션을 진행 한 뒤 리뷰요청 주시면 감사하겠습니다 🙇
assertThat(selectResult.get(0).getProduct()).isEqualTo("감자"); | ||
assertThat(selectResult.get(0).getQuantity()).isEqualTo(3); | ||
assertThat(selectResult.get(1).getProduct()).isEqualTo("고구마"); | ||
assertThat(selectResult.get(1).getQuantity()).isEqualTo(1); |
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.
전 단계 피드백 반영해주셨네요 👍
private List<Field> findOneToManyFields(Class<?> clazz) { | ||
return Arrays.stream(clazz.getDeclaredFields()) | ||
.filter(field -> field.isAnnotationPresent(OneToMany.class)) | ||
.findFirst() | ||
.orElseThrow(() -> new RuntimeException("OneToMany 필드를 찾을 수 없습니다.")); | ||
.collect(Collectors.toList()); | ||
} |
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.
여전히 이 행위는 QueryBuilder
가 하기에는 과한 책임 같아요 😢
ParentEntity 의 metadata 로 가져와 볼 수 있지 않을까요?
columns.add(oneToManyColumn.getForeignKeyColumnName()); | ||
List<Field> oneToManyFields = findOneToManyFields(parentEntity.getClass()); | ||
for (Field oneToManyField : oneToManyFields) { | ||
EntityColumn oneToManyColumn = EntityColumn.from(oneToManyField); |
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.
그럼 매번 여기서 생성 할 필요 없을 것 같아요
안녕하세요 종민님.
그전단계에서 해결못한 부분만 우선 수정해서 PR올렸습니다.
#105 (comment)
이부분은 아직 반영하지 못하였습니다