Skip to content
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

1단계 - OneToMany (FetchType.EAGER) #128

Open
wants to merge 2 commits into
base: tmddnrdl333
Choose a base branch
from

Conversation

tmddnrdl333
Copy link

구조를 많이 바꾸다보니 작업량이 많아질 것 같아서 일단 PR 올려봅니다..!
계속 진행해나가겠습니다.

Copy link
Member

@jongmin4943 jongmin4943 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요 승욱님 😃

1단계 진행 해주셨네요.
요구사항 진행이 안된 것으로 보이는데, README 와 같은 부분에 어떤 생각을 가지시고, 어떤 것들을 진행했는지 나타내주시면 리뷰하기 좀 더 좋을 것 같아요 👍

만들어 주신 부분을 실행시켜보려 하니, 컴파일 에러가 나는데 확인 부탁드립니다 🙇

미션 진행하시며 궁금한 사항이 있으시면 편하게 코멘트 또는 DM 주세요! 😃

Comment on lines +3 to +4
import example.entity.Order;
import example.entity.OrderItem;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 두가지 클래스를 찾지 못해 컴파일 에러가 나네요 😭

Comment on lines 13 to +14
public class EntityUtils {
public static ColumnInfo getIdColumn(Class<?> clazz) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EntityUtils 정적 메서드들을 가진 클래스인데 정적클래스가 아닌, 특정 객체에게 책임을 주는것은 어떻게 생각하시나요?

Comment on lines +7 to +10
public class ColumnInfo {
private TableInfo tableInfo;
private Class<?> columnType;
private String columnName;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ColumnInfoTableInfo 를 가지고 있네요. 구현 외적으로 단순히 이름만 보자면, 개인적으로 TableInfoColumnInfo 들을 가지고 있는게 더 자연스럽다 생각하는데 어떻게 생각하시나요?

Comment on lines +22 to +24
public Class<?> getColumnType() {
return columnType;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 쓰이고 있지 않네요. 당장 필요가 없다면 과감히 제거하고, 필요할때 만들어보시는건 어떨까요?

Comment on lines +6 to +7
private ColumnInfo onConditionColumn1;
private ColumnInfo onConditionColumn2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

단순히 1, 2 라는 변수 이름을 보고 바로 명확하게 알기 어려울 것 같아요 😢

public String toString() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder
.append("select * from ")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

select * 이 아닌, 필요한 필드명들을 나열해서 쿼리가 나오도록 만들어주시면 감사하겠습니다 🙇

logger.debug("query : {}", selectQuery);
String query = selectQuery.toString();
logger.debug(query);
assertThat(query).isEqualTo("select * from orders where id = 1 inner join order_items on orders.order_id = order_items.id;");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 해당 쿼리가 db 에서 실행이 가능한 정상적인 쿼리가 맞을까요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants