Skip to content

Commit

Permalink
EPMRPP-93481 extend ProjectUserRepository (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx authored Oct 11, 2024
1 parent ebfad95 commit 920d089
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.epam.ta.reportportal.entity.user.ProjectUser;
import com.epam.ta.reportportal.entity.user.ProjectUserId;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

Expand All @@ -30,4 +31,6 @@ public interface ProjectUserRepository extends ReportPortalRepository<ProjectUse

@Query(value = "SELECT pu.project_id FROM project_user pu WHERE pu.user_id = :userId", nativeQuery = true)
List<Long> findProjectIdsByUserId(@Param("userId") Long userId);

Optional<ProjectUser> findProjectUserByUserIdAndProjectId(Long userId, Long projectId);
}

0 comments on commit 920d089

Please sign in to comment.