Skip to content

Commit cce30e2

Browse files
committed
Fix Notification entity: add @Nationalized for NVARCHAR(MAX) column
- Hibernate validates body column expecting varchar(max) (CLOB) - Migration creates it as NVARCHAR(MAX) for Unicode support - Add @Nationalized annotation so Hibernate expects NVARCHAR(MAX)
1 parent e5c64be commit cce30e2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

backend/src/main/java/com/ontario/program/model/Notification.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import jakarta.persistence.Lob;
1313
import jakarta.persistence.ManyToOne;
1414
import jakarta.persistence.PrePersist;
15+
16+
import org.hibernate.annotations.Nationalized;
1517
import jakarta.persistence.PreUpdate;
1618
import jakarta.persistence.Table;
1719

@@ -41,6 +43,7 @@ public class Notification {
4143
private String subject;
4244

4345
@Lob
46+
@Nationalized
4447
@Column(name = "body", nullable = false)
4548
private String body;
4649

0 commit comments

Comments
 (0)