From 405b9f1a4124d2d49f6f919dfb542c0f09de0db0 Mon Sep 17 00:00:00 2001 From: unanchoi Date: Tue, 16 Jul 2024 01:32:28 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20AlbumDesign=20Entity=20=EA=B5=AC?= =?UTF-8?q?=EC=84=B1=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/pophory/pophorydomain/album/Album.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pophory-domain/src/main/java/com/pophory/pophorydomain/album/Album.java b/pophory-domain/src/main/java/com/pophory/pophorydomain/album/Album.java index 881fc47..11ffca2 100644 --- a/pophory-domain/src/main/java/com/pophory/pophorydomain/album/Album.java +++ b/pophory-domain/src/main/java/com/pophory/pophorydomain/album/Album.java @@ -30,9 +30,7 @@ public class Album extends BaseTimeEntity { private String title = "기본 앨범"; - @JoinColumn(name = "album_design_id") - @OneToOne(fetch = LAZY) - private AlbumDesign albumDesign; + private Long albumDesignId; @Min(value = 1, message = "사진제한은 1장 이상이어야 합니다.") private int photoLimit; @@ -57,7 +55,7 @@ public void softDelete() { @Builder public Album(String title, AlbumDesign albumDesign, int photoLimit, String imageUrl, Member member) { this.title = title; - this.albumDesign = albumDesign; + this.albumDesignId = albumDesign.getId(); this.photoLimit = photoLimit; this.imageUrl = imageUrl; this.member = member; @@ -68,7 +66,7 @@ private void validatePhotoLimit(int photoLimit) { } public void updateAlbumDesign(AlbumDesign albumDesign) { - this.albumDesign = albumDesign; + this.albumDesignId = albumDesign.getId(); } public void updateMember(Member member) {