Skip to content

Commit

Permalink
PI-1937: Fix notes for clob type (#3458)
Browse files Browse the repository at this point in the history
* PI-1937: Fix notes for clob type
  • Loading branch information
pmcphee77 authored Mar 12, 2024
1 parent ba72fef commit 9e98a2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import java.time.LocalDate
data class MainOffence(
val offence: Offence,
val dateOfOffence: LocalDate,
val notes: String,
val notes: String?,
val additionalOffences: List<Offence>
)
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class Event(
@OneToMany(mappedBy = "event")
val additionalOffences: List<AdditionalOffence> = emptyList(),

@Column(name = "notes")
val notes: String,
@Column(name = "notes", columnDefinition = "clob")
val notes: String?,

@Column(columnDefinition = "number")
val softDeleted: Boolean = false
Expand Down Expand Up @@ -152,7 +152,7 @@ class AdditionalOffence(
val id: Long,

@Column(name = "offence_count")
val offenceCount: Long,
val offenceCount: Long?,

@ManyToOne
@JoinColumn(name = "event_id", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SentenceService(
notes = notes,
additionalOffences = additionalOffences.map {
Offence(
description = it.offence.description, count = it.offenceCount
description = it.offence.description, count = it.offenceCount ?: 0
)
}
)
Expand Down

0 comments on commit 9e98a2a

Please sign in to comment.