Skip to content

Commit

Permalink
fix: Change query to database to avoid the runtime error (#618)
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Kopysov <[email protected]>
  • Loading branch information
o-kopysov authored Sep 23, 2024
1 parent aa59ab7 commit 9f5d6ba
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public interface LPVSPullRequestRepository extends JpaRepository<LPVSPullRequest
* @param queueId ID of the related element from the queue.
* @return {@link LPVSPullRequest} entity with the specified queue ID.
*/
@Query(value = "SELECT pr FROM LPVSPullRequest pr WHERE pr.queueId = :queueId LIMIT 1")
@Query(
value =
"SELECT pr FROM LPVSPullRequest pr WHERE pr.queueId = :queueId ORDER BY pr.id DESC LIMIT 1")
LPVSPullRequest findByQueueId(@Param("queueId") Long queueId);

/**
Expand Down

0 comments on commit 9f5d6ba

Please sign in to comment.