-
Notifications
You must be signed in to change notification settings - Fork 4
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
[feat/CK-242] 로드맵 관련 부분 의존성 리팩토링을 한다 #206
Changes from 1 commit
d72b469
2ea6239
91f128b
7085619
3c0ba17
354f9b6
c8fc8f4
a307525
7ce0184
b63f1b7
a0f588b
3d6cd17
df672b0
7a1b1f3
3c5fc04
9cf3c2a
bdccbbc
5cf8113
a0472bc
732673f
fc761d5
ac71f6e
3a7e610
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 클래스는 이제 없어져도 되겠네요! |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 클래스도 이제 없어져도 될것 같아요! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 둘 다 없애버렸습니다 😀 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
package co.kirikiri.roadmap.persistence; | ||
|
||
import co.kirikiri.roadmap.domain.Roadmap; | ||
import co.kirikiri.roadmap.domain.RoadmapContent; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface RoadmapContentRepository extends JpaRepository<RoadmapContent, Long> { | ||
|
||
Optional<RoadmapContent> findFirstByRoadmapIdOrderByCreatedAtDesc(final Long roadmapId); | ||
|
||
Optional<RoadmapContent> findFirstByRoadmapOrderByCreatedAtDesc(final Roadmap roadmap); | ||
List<RoadmapContent> findAllByRoadmapId(final Long roadmapId); | ||
|
||
@Query("select rc from RoadmapContent rc " | ||
+ "join fetch rc.roadmap r " | ||
+ "where rc.id = :roadmapContentId") | ||
Optional<RoadmapContent> findByIdWithRoadmap(@Param("roadmapContentId") final Long roadmapContentId); | ||
void deleteAllByRoadmapId(final Long roadmapId); | ||
} |
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.
Roadmap
생성자 중에서 사용하지 않거나 테스트에서만 사용하는 생성자를 정리하면 좋을 것 같아요 😊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.
생성자 몇 개 없애버리니 기분이 좋네요