Skip to content

Commit

Permalink
fix : 기존의 HashSet 을 LinkedHashSet 으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
kpeel5839 committed Sep 27, 2023
1 parent bbde16d commit 648d56c
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -47,13 +46,13 @@ public class Topic extends BaseTimeEntity {
private Member creator;

@OneToMany(mappedBy = "topic")
private Set<Permission> permissions = new HashSet<>();
private Set<Permission> permissions = new LinkedHashSet<>();

@OneToMany(mappedBy = "topic", cascade = CascadeType.PERSIST)
private Set<Pin> pins = new HashSet<>();
private Set<Pin> pins = new LinkedHashSet<>();

@OneToMany(mappedBy = "topic", cascade = CascadeType.PERSIST, orphanRemoval = true)
private Set<Bookmark> bookmarks = new HashSet<>();
private Set<Bookmark> bookmarks = new LinkedHashSet<>();

@Column(nullable = false)
@ColumnDefault(value = "0")
Expand Down

0 comments on commit 648d56c

Please sign in to comment.