Skip to content

Commit

Permalink
refactor: PostHashtag를 List로 변경 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
medoeun committed Aug 23, 2024
1 parent 475f215 commit 7929802
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import lombok.*;
import team05.integrated_feed_backend.common.BaseEntity;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

@Entity
Expand All @@ -21,5 +23,6 @@ public class Hashtag extends BaseEntity {
private String hashtag;

@OneToMany(mappedBy = "hashtag", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
private Set<PostHashtag> postHashtags = new HashSet<PostHashtag>();
private List<PostHashtag> postHashtags = new ArrayList<>();

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import team05.integrated_feed_backend.common.enums.SocialMediaType;
import team05.integrated_feed_backend.common.BaseEntity;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;


Expand Down Expand Up @@ -40,5 +42,6 @@ public class Post extends BaseEntity {
private Long shareCount;

@OneToMany(mappedBy = "post", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
private Set<PostHashtag> postHashtags = new HashSet<PostHashtag>();
private List<PostHashtag> postHashtags = new ArrayList<>();

}

0 comments on commit 7929802

Please sign in to comment.