Skip to content

Commit

Permalink
add NumericBooleanConverter, to prevent local test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
achimber-moj committed Dec 10, 2024
1 parent 3ed5a0d commit 1d9a0a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package uk.gov.justice.digital.hmpps.controller.casedetails.entity

import jakarta.persistence.Column
import jakarta.persistence.Entity
import jakarta.persistence.Id
import jakarta.persistence.JoinColumn
import jakarta.persistence.ManyToOne
import jakarta.persistence.Table
import jakarta.persistence.*
import org.hibernate.annotations.Immutable
import org.hibernate.annotations.SQLRestriction
import org.hibernate.type.NumericBooleanConverter
import java.time.LocalDate

@Immutable
Expand All @@ -31,5 +27,7 @@ class AliasEntity(
@ManyToOne
@JoinColumn(name = "offender_id", nullable = false)
val case: CaseEntity,
@Column(name = "soft_deleted", columnDefinition = "number")
@Convert(converter = NumericBooleanConverter::class)
val softDeleted: Boolean = false
)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package uk.gov.justice.digital.hmpps.controller.casedetails.entity

import jakarta.persistence.Column
import jakarta.persistence.Entity
import jakarta.persistence.Id
import jakarta.persistence.JoinColumn
import jakarta.persistence.ManyToOne
import jakarta.persistence.Table
import jakarta.persistence.*
import org.hibernate.annotations.Immutable
import org.hibernate.annotations.SQLRestriction
import org.hibernate.type.NumericBooleanConverter
import uk.gov.justice.digital.hmpps.integrations.common.entity.ReferenceData
import java.time.LocalDate

Expand All @@ -33,7 +29,13 @@ class RegistrationEntity(
@ManyToOne
@JoinColumn(name = "registration_level", updatable = false)
val level: ReferenceData,

@Column(name = "soft_deleted", columnDefinition = "number")
@Convert(converter = NumericBooleanConverter::class)
val softDeleted: Boolean = false,

@Column(name = "deregistered", columnDefinition = "number")
@Convert(converter = NumericBooleanConverter::class)
val deregistered: Boolean = false
)

Expand Down

0 comments on commit 1d9a0a9

Please sign in to comment.