Skip to content

Commit

Permalink
Merge pull request #183 from arnaugarcia/feature/following-users-attr…
Browse files Browse the repository at this point in the history
…ibutes

Fixed missing entity graph for user authorities
  • Loading branch information
arnaugarcia authored May 10, 2020
2 parents e1a4fbb + 7fcdf30 commit dcb029f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/sallefy/repository/UserRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.Optional;

import static com.sallefy.domain.User_.AUTHORITIES;
import static com.sallefy.domain.graphs.UserGraph.GRAPH_USER_ENTITY_ALL;

/**
* Spring Data JPA repository for the {@link User} entity.
Expand All @@ -40,6 +41,7 @@ public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificat
Optional<User> findOneWithAuthoritiesById(Long id);

@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
@EntityGraph(GRAPH_USER_ENTITY_ALL)
Optional<User> findOneWithAuthoritiesByLogin(String login);

@EntityGraph(attributePaths = AUTHORITIES)
Expand Down

0 comments on commit dcb029f

Please sign in to comment.