diff --git a/backend/src/main/java/com/mapbefine/mapbefine/topic/domain/Topic.java b/backend/src/main/java/com/mapbefine/mapbefine/topic/domain/Topic.java index 6bd7ad3b..25bac1b6 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/topic/domain/Topic.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/topic/domain/Topic.java @@ -19,14 +19,13 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.PrePersist; +import java.time.LocalDateTime; +import java.util.LinkedHashSet; +import java.util.Set; import lombok.Getter; import lombok.NoArgsConstructor; import org.hibernate.annotations.ColumnDefault; -import java.time.LocalDateTime; -import java.util.HashSet; -import java.util.Set; - @Entity @NoArgsConstructor(access = PROTECTED) @Getter @@ -47,13 +46,13 @@ public class Topic extends BaseTimeEntity { private Member creator; @OneToMany(mappedBy = "topic") - private Set permissions = new HashSet<>(); + private Set permissions = new LinkedHashSet<>(); @OneToMany(mappedBy = "topic", cascade = CascadeType.PERSIST) - private Set pins = new HashSet<>(); + private Set pins = new LinkedHashSet<>(); @OneToMany(mappedBy = "topic", cascade = CascadeType.PERSIST, orphanRemoval = true) - private Set bookmarks = new HashSet<>(); + private Set bookmarks = new LinkedHashSet<>(); @Column(nullable = false) @ColumnDefault(value = "0")