Skip to content

Commit

Permalink
PI-2568 Ignore referential integrity violation on contact id (#4282)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Oct 7, 2024
1 parent 66104ef commit 1b4f50d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package uk.gov.justice.digital.hmpps.integrations.delius.assessment.entity

import jakarta.persistence.*
import org.hibernate.annotations.NotFound
import org.hibernate.annotations.NotFoundAction
import org.hibernate.type.YesNoConverter
import org.springframework.data.jpa.domain.support.AuditingEntityListener
import org.springframework.data.jpa.repository.EntityGraph
Expand Down Expand Up @@ -33,6 +35,7 @@ class OasysAssessment(

@ManyToOne(cascade = [CascadeType.ALL])
@JoinColumn(name = "contact_id")
@NotFound(action = NotFoundAction.IGNORE) // No foreign key on contact_id
val contact: Contact,

@ManyToOne
Expand Down

0 comments on commit 1b4f50d

Please sign in to comment.