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

[REFACTOR] 리그 생성 시 자동으로 Organization 등록되도록 수정 #223

Closed
wants to merge 30 commits into from

Conversation

Zena0128
Copy link
Contributor

@Zena0128 Zena0128 commented Sep 19, 2024

🌍 이슈 번호

📝 구현 내용

  • 리그 생성 시 자동으로 매니저의 organization을 리그에 등록. organization을 request로 보내지 않아도 되도록 수정

🍀 확인해야 할 부분

Zena0128 and others added 30 commits September 11, 2024 17:26
…into refactor/#222-league

[MERGE] 메인 브랜치와 병합
@Zena0128 Zena0128 changed the title Refactor/#222 league [REFACTOR] 리그 생성 시 자동으로 Organization 등록되도록 수정 Sep 19, 2024
Copy link
Contributor

@Jin409 Jin409 left a comment

Choose a reason for hiding this comment

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

베이스 브랜치가 잘못 설정된 것 같은데 ㅜㅜ 메인 브랜치가 아니라 게임 수정 브랜치에서 분기하신 것 같네요
이 pr 머지해버리면 변경사항 전부 다 반영되기 때문에 베이스 브랜치 바꿔주세요!

public League toEntity(final Member manager, final Organization organization) {
return new League(manager, organization, name, startAt, endAt, Round.from(maxRound));
public League toEntity(final Member manager) {
return new League(manager, manager.getOrganization(), name, startAt, endAt, Round.from(maxRound));
Copy link
Contributor

Choose a reason for hiding this comment

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

흠.. 이렇게 하면 쿼리가 한번 더 나가게 되지 않을까요?
AuthMemberResolver 에서 Member 를 자동으로 주입하고 있기 때문에 어쩔 수 없으려나요? 어떻게 생각하시나요?

Copy link
Contributor Author

@Zena0128 Zena0128 Sep 19, 2024

Choose a reason for hiding this comment

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

@Jin409 join쿼리로 member의 organization까지 한 번에 가져오는 방법도 생각해보긴 했는데..
어차피 멤버는 한 개만 들어와서 join쿼리의 효율성이 높지 않기도 하고,
join쿼리로 organization을 가져오든, get으로 organization을 가져오든 상관 없이
인증 과정에서 파라미터로 받는 멤버를 조회하는 쿼리 한 번 + organization 가져오는 쿼리 한 번 총 두 번 실행되어 유의미한 차이가 없을 것으로 생각해서 요렇게 짜긴 했어요!
더 효율적인 방법이 있으려나요?? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

흠 그쵸 그쵸 어차피 한개니까 괜찮을 것 같아요!
그리고 organization 이 이제 의미가 없어서 데이터베이스 상에 데이터도 얼마 없을 것 같아서 괜찮을 것 같네요! 굳굳

@Zena0128
Copy link
Contributor Author

베이스 브랜치가 잘못 설정된 것 같은데 ㅜㅜ 메인 브랜치가 아니라 게임 수정 브랜치에서 분기하신 것 같네요 이 pr 머지해버리면 변경사항 전부 다 반영되기 때문에 베이스 브랜치 바꿔주세요!

헉스 브랜치 수정하겠습미다 ....!!!!

@Zena0128 Zena0128 closed this Sep 19, 2024
@Zena0128 Zena0128 deleted the refactor/#222-league branch September 19, 2024 09:42
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