We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 032cac1 commit e899d79Copy full SHA for e899d79
1 file changed
src/main/java/sopt/comfit/report/domain/AIReportRepository.java
@@ -23,6 +23,11 @@ Page<AIReport> findByExperienceUserIdAndKeyword(
23
Pageable pageable
24
);
25
26
- Optional<AIReport> findByExperienceUserIdAndId(Long userId, Long id);
+ @Query("SELECT a FROM AIReport a " +
27
+ "JOIN FETCH a.company " +
28
+ "JOIN FETCH a.experience " +
29
+ "WHERE a.experience.user.id = :userId AND a.id = :id")
30
+ Optional<AIReport> findByExperienceUserIdAndId(@Param("userId") Long userId, @Param("id") Long id);
31
+
32
boolean existsByCompanyIdAndExperienceUserId(Long companyId, Long userId);
33
}
0 commit comments