Skip to content

Commit

Permalink
[FIX] #555 jpa method param annotation add
Browse files Browse the repository at this point in the history
  • Loading branch information
AYoungSn committed Mar 20, 2024
1 parent d4abbb0 commit c7c5b26
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface ApplicationRepository extends JpaRepository<Application, Long>

@EntityGraph(attributePaths = {"recruit"})
@Query("SELECT a FROM Application a WHERE a.user.id = :userId and a.isDeleted = false")
List<Application> findAllByUserId(Long userId);
List<Application> findAllByUserId(@Param("userId") Long userId);

@Query("SELECT a FROM Application a "
+ "JOIN FETCH a.recruit r "
Expand All @@ -25,6 +25,6 @@ public interface ApplicationRepository extends JpaRepository<Application, Long>
+ "JOIN FETCH a.recruit r "
+ "WHERE a.id = :applicationId and a.user.id = :userId "
+ "and r.id = :recruitmentId and a.isDeleted = false and r.isDeleted = false")
Optional<Application> findApplication(@Param("applicationId") Long applicationId, @Param("userId")Long userId,
@Param("recruitmentId")Long recruitmentId);
Optional<Application> findApplication(@Param("applicationId") Long applicationId, @Param("userId") Long userId,
@Param("recruitmentId") Long recruitmentId);
}

0 comments on commit c7c5b26

Please sign in to comment.