Skip to content

Commit

Permalink
[extract] fix fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-christl committed Jan 26, 2024
1 parent 535d1b7 commit 2da7576
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ default ProgrammingSubmission findFirstByParticipationIdAndCommitHashOrderByIdDe
@Query("""
SELECT s
FROM ProgrammingSubmission s
LEFT JOIN s.results r
LEFT JOIN FETCH s.results r
WHERE s.participation.id = :participationId
""")
List<ProgrammingSubmission> findAllByParticipationIdWithResults(@Param("participationId") Long participationId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ OR CONCAT(user.firstName, ' ', user.lastName) LIKE %:#{#loginOrName}%
@Query("""
SELECT user
FROM User user
LEFT JOIN user.groups userGroup
LEFT JOIN FETCH user.groups userGroup
WHERE user.isDeleted = false AND (
userGroup IN :#{#groupNames}
AND (user.login LIKE :#{#loginOrName}% OR concat(user.firstName, ' ', user.lastName) LIKE %:#{#loginOrName}%)
Expand All @@ -227,7 +227,7 @@ Page<User> searchAllByLoginOrNameInGroupsNotUserId(Pageable pageable, @Param("lo
@Query("""
SELECT user
FROM User user
LEFT JOIN user.groups userGroup
LEFT JOIN FETCH user.groups userGroup
WHERE user.isDeleted = false AND (
userGroup IN :#{#groupNames}
AND (user.login LIKE :#{#loginOrName}% OR concat(user.firstName, ' ', user.lastName) LIKE %:#{#loginOrName}%)
Expand Down

0 comments on commit 2da7576

Please sign in to comment.