From 8fb851ec7af5b89fe4de2ee77d3381f0eef8c564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=8A=B9=EC=A7=84?= Date: Sun, 31 Mar 2024 02:13:37 +0900 Subject: [PATCH] [FIX] change fetch type to lazy --- .../com/twtw/backend/domain/group/entity/GroupMember.java | 4 ++-- .../twtw/backend/domain/notification/entity/Notification.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java b/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java index dbd9db36..c0c8dbed 100644 --- a/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java +++ b/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java @@ -30,11 +30,11 @@ public class GroupMember implements Auditable { @Column(columnDefinition = "BINARY(16)") private UUID id = UlidCreator.getMonotonicUlid().toUuid(); - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "group_id") private Group group; - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "member_id") private Member member; diff --git a/backend/src/main/java/com/twtw/backend/domain/notification/entity/Notification.java b/backend/src/main/java/com/twtw/backend/domain/notification/entity/Notification.java index ff18219e..5c3fd2e0 100644 --- a/backend/src/main/java/com/twtw/backend/domain/notification/entity/Notification.java +++ b/backend/src/main/java/com/twtw/backend/domain/notification/entity/Notification.java @@ -28,7 +28,7 @@ public class Notification implements Auditable { @Id @Column(columnDefinition = "BINARY(16)") - private final UUID id = UlidCreator.getMonotonicUlid().toUuid(); + private UUID id = UlidCreator.getMonotonicUlid().toUuid(); @Column(nullable = false) private String title;