From dcb6e15ee7def66eb8fae91f41b924de942933ed Mon Sep 17 00:00:00 2001 From: Anthony Britton <105213050+anthony-britton-moj@users.noreply.github.com> Date: Tue, 5 Dec 2023 17:08:15 +0000 Subject: [PATCH] PI-1714 (#2872) * PI-1714 * PI-1714 refactor * PI-1714 fix non unique * PI-1714 fix non unique --- .../hmpps/integrations/delius/custody/date/CustodyRepository.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/custody-key-dates-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/custody/date/CustodyRepository.kt b/projects/custody-key-dates-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/custody/date/CustodyRepository.kt index 23a0ed4984..4981e9f707 100644 --- a/projects/custody-key-dates-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/custody/date/CustodyRepository.kt +++ b/projects/custody-key-dates-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/custody/date/CustodyRepository.kt @@ -24,6 +24,6 @@ interface CustodyRepository : JpaRepository { fun findCustodyId(personId: Long, bookingRef: String): List @Lock(LockModeType.PESSIMISTIC_READ) - @Query("select c.id from Custody c") + @Query("select c.id from Custody c where c.id = :id") fun findForUpdate(id: Long): Long }