Skip to content

Commit

Permalink
fix: findById 오버라이딩하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
nuyh99 committed Aug 10, 2023
1 parent 7124da0 commit 0137acb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package wooteco.prolog.roadmap.domain.repository;

import java.util.List;
import java.util.Set;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import wooteco.prolog.roadmap.domain.Keyword;

import java.util.List;
import java.util.Optional;
import java.util.Set;

import static org.springframework.data.jpa.repository.EntityGraph.EntityGraphType.FETCH;

public interface KeywordRepository extends JpaRepository<Keyword, Long> {

@EntityGraph(attributePaths = "recommendedPosts", type = FETCH)
Optional<Keyword> findById(final long id);
Optional<Keyword> findById(final Long id);

@EntityGraph(attributePaths = "recommendedPosts", type = FETCH)
List<Keyword> findAll();
Expand Down

0 comments on commit 0137acb

Please sign in to comment.