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

♻ remove unnecessary JPQL #457

Merged
merged 4 commits into from
Mar 4, 2025
Merged

♻ remove unnecessary JPQL #457

merged 4 commits into from
Mar 4, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 13, 2025

제가 findRecipeDataV1 없애는거 따로, findAllByAuthorId로 JPA 사용하게 바꾸는거 따로 커밋을 했거든요...
풀땡기니까 폰드꺼랑 컨플릭트나서 여차저차 해결했더니... PR 창에서 여전히 컨플릭트때문에 머지 못한다고 하더라고요?
그래서 rebase하면서 다시 해결했더니 커밋이 하나가 되었네요....;;
알아보기 힘드시면 브랜치 새로 파서 금방 다시 올리겠습니다 ㅋㅋ ㅜㅜ
의견 주십쇼,,,

+) 아이디 대신 도메인 리턴하도록 변경한 커밋도 추가했습니다~~ 충돌이 안나니까 눈물이 다 나네요

closes #456

Copy link
Contributor Author

Overall Project 89.03% 🍏
Files changed 100% 🍏

File Coverage
RecipeHomeWithMineResponseV1.java 100% 🍏
UserService.java 94.52% 🍏
RecipeService.java 87.04% 🍏

Copy link
Contributor Author

Overall Project 89.03% 🍏
Files changed 100% 🍏

File Coverage
RecipeHomeWithMineResponseV1.java 100% 🍏
UserService.java 94.52% 🍏
RecipeService.java 87.04% 🍏

@hyxrxn hyxrxn requested review from HaiSeong and tackyu February 15, 2025 14:36
Copy link
Contributor

@tackyu tackyu left a comment

Choose a reason for hiding this comment

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

LGTM입니다!!

Copy link
Contributor Author

Overall Project 89.08% -0.57% 🍏
Files changed 81.41% 🍏

File Coverage
RecipeHomeWithMineResponseV1.java 100% 🍏
UserService.java 94.52% 🍏
RecipeService.java 87.52% -5.74% 🍏

@hyxrxn hyxrxn requested review from tackyu and HaiSeong and removed request for HaiSeong February 28, 2025 06:01
Copy link

@HaiSeong HaiSeong left a comment

Choose a reason for hiding this comment

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

아토 수고하셨습니다. 👍

FROM Recipe r
WHERE r.author.id = :userId
""")
List<Long> findRecipeIdsByUserId(long userId);
Copy link

Choose a reason for hiding this comment

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

👍 👍

Comment on lines +14 to 18
SELECT recipe
FROM CategoryRecipe
WHERE category.name = :category
ORDER BY recipe.createdAt DESC
""")
Copy link

Choose a reason for hiding this comment

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

이 쿼리 자체는 지울수 없을요?
네임드 쿼리로 변경 가능할 것 같은데 확인 해주실 수 있나요

Copy link
Contributor

Choose a reason for hiding this comment

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

드라이빙 테이블을 CategoryRecipe로 바꾸고 싶어서 쿼리를 직접 쓴거기도 하고, RecipeCategory를 들고있지 않아서 불가능합니다!
RecipeRepository 말고 CategoryRepository에서 실행하면 CategoryRecipe 객체 리스트를 리턴하게 해서 가능합니다.

Copy link
Contributor

@tackyu tackyu left a comment

Choose a reason for hiding this comment

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

아토 고생 많으셨습니다!!

@@ -20,49 +20,53 @@ class RecipeRepositoryTest {
private RecipeRepository repository;

@Test
@DisplayName("요청한 페이지에 카테고리 이름으로 레시피 id 목록을 반환한다.")
@DisplayName("요청한 페이지에 카테고리 이름으로 레시피 목록을 반환한다.")
void findRecipeIdsByCategory() {
Copy link
Contributor

Choose a reason for hiding this comment

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

테스트코드 메서드 명을 같이 수정해도 좋을 것 같아요

Copy link
Contributor

Choose a reason for hiding this comment

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

좋은 의견입니다! 반영했습니다!

Copy link
Contributor Author

github-actions bot commented Mar 4, 2025

Overall Project 90.33% -0.56% 🍏
Files changed 81.41% 🍏

File Coverage
RecipeHomeWithMineResponseV1.java 100% 🍏
UserService.java 94.71% 🍏
RecipeService.java 87.52% -5.74% 🍏

@hyxrxn hyxrxn merged commit 45cb6b0 into be/dev Mar 4, 2025
1 check passed
@hyxrxn hyxrxn deleted the be/feat/456 branch March 4, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend ♻️ refactor refactor
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants