From 08544e1428dc0850edc4a53eb3a9ed329d4f9761 Mon Sep 17 00:00:00 2001 From: Alex Prudencio Date: Tue, 6 Aug 2024 23:43:29 -0400 Subject: [PATCH] fix large fields --- src/main/java/com/primefactorsolutions/model/Question.java | 3 +++ src/main/java/com/primefactorsolutions/model/Submission.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/main/java/com/primefactorsolutions/model/Question.java b/src/main/java/com/primefactorsolutions/model/Question.java index a6e295a..35481f3 100644 --- a/src/main/java/com/primefactorsolutions/model/Question.java +++ b/src/main/java/com/primefactorsolutions/model/Question.java @@ -1,6 +1,7 @@ package com.primefactorsolutions.model; import jakarta.persistence.Entity; +import jakarta.persistence.Lob; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -13,6 +14,8 @@ import lombok.NoArgsConstructor; @EqualsAndHashCode(callSuper = true) public class Question extends BaseEntity{ private String title; + @Lob private String description; + @Lob private String content; } diff --git a/src/main/java/com/primefactorsolutions/model/Submission.java b/src/main/java/com/primefactorsolutions/model/Submission.java index 749c5c6..a2186f4 100644 --- a/src/main/java/com/primefactorsolutions/model/Submission.java +++ b/src/main/java/com/primefactorsolutions/model/Submission.java @@ -3,6 +3,7 @@ package com.primefactorsolutions.model; import io.hypersistence.utils.hibernate.type.json.JsonType; import jakarta.persistence.Column; import jakarta.persistence.Entity; +import jakarta.persistence.Lob; import jakarta.persistence.ManyToOne; import lombok.AllArgsConstructor; import lombok.Data; @@ -21,6 +22,7 @@ public class Submission extends BaseEntity { @ManyToOne private Question question; + @Lob private String response; @Type(JsonType.class)