From 0a3d60e17ecd2b661ebc7cd226865ab13e40dcc3 Mon Sep 17 00:00:00 2001 From: LeeJaehyung <540900@naver.com> Date: Mon, 30 Sep 2024 17:49:28 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20#173=20settlement=20=EC=97=94=ED=84=B0?= =?UTF-8?q?=ED=8B=B0=EC=97=90=EC=84=9C=20cascade=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gt/genti/settlement/model/Settlement.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/genti-domain/src/main/java/com/gt/genti/settlement/model/Settlement.java b/genti-domain/src/main/java/com/gt/genti/settlement/model/Settlement.java index 36423e2b..647a7efe 100644 --- a/genti-domain/src/main/java/com/gt/genti/settlement/model/Settlement.java +++ b/genti-domain/src/main/java/com/gt/genti/settlement/model/Settlement.java @@ -4,15 +4,7 @@ import com.gt.genti.common.basetimeentity.model.BaseTimeEntity; import com.gt.genti.picturegenerateresponse.model.PictureGenerateResponse; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; -import jakarta.persistence.JoinColumn; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.OneToOne; -import jakarta.persistence.Table; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -28,7 +20,7 @@ public class Settlement extends BaseTimeEntity { @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; - @OneToOne + @OneToOne(cascade = CascadeType.REMOVE) @JoinColumn(name = "picture_generate_response_id", referencedColumnName = "id", nullable = false) PictureGenerateResponse pictureGenerateResponse;