Skip to content

Commit

Permalink
Feat: removed unused mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
versatile0010 committed Apr 4, 2024
1 parent 4019b6c commit 162658c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public class Article extends BaseTimeEntity {
@Column(name = "article_id")
private Long id;

@OneToMany(mappedBy = "article", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
private List<CommentEntity> comments = new ArrayList<>();
// @OneToMany(mappedBy = "article", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
// private List<CommentEntity> comments = new ArrayList<>();

@OneToMany(mappedBy = "article", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
private List<ArticleParticipant> articleParticipants = new ArrayList<>();
// @OneToMany(mappedBy = "article", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
// private List<ArticleParticipant> articleParticipants = new ArrayList<>();

@OneToMany(mappedBy = "article", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
private List<ArticleImage> articleImages = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class CommentEntity extends BaseTimeEntity {
@JoinColumn(name = "parent_id")
private CommentEntity parent;

@OneToMany(mappedBy = "parent", orphanRemoval = true)
private List<CommentEntity> childs = new ArrayList<>();
// @OneToMany(mappedBy = "parent", orphanRemoval = true)
// private List<CommentEntity> childs = new ArrayList<>();

public CommentEntity(String content, Article article, Member author) {
this.depth = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class Conversation extends BaseTimeEntity {
@JoinColumn(name = "conversation_id")
private Conversation parent;

@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
private List<Conversation> conversations = new ArrayList<>();
// @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
// private List<Conversation> conversations = new ArrayList<>();

@OneToMany(mappedBy = "conversation", cascade = CascadeType.ALL)
private List<ConversationLike> likes = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ public class Member extends BaseTimeEntity {
@Comment("마음 갯수")
private Integer heartCnt;

@OneToMany(mappedBy = "member", cascade = CascadeType.ALL)
private List<Support> supports = new ArrayList<>();

@OneToMany(mappedBy = "member", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
private List<CommentLike> commentLikes = new ArrayList<>();

@OneToMany(mappedBy = "member", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
private List<ArticleLike> articleLikes = new ArrayList<>();
// @OneToMany(mappedBy = "member", cascade = CascadeType.ALL)
// private List<Support> supports = new ArrayList<>();
//
// @OneToMany(mappedBy = "member", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
// private List<CommentLike> commentLikes = new ArrayList<>();
//
// @OneToMany(mappedBy = "member", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
// private List<ArticleLike> articleLikes = new ArrayList<>();

@OneToMany(mappedBy = "member", cascade = {CascadeType.PERSIST, CascadeType.MERGE}, orphanRemoval = true)
private List<Friendship> friendships = new ArrayList<>();
Expand All @@ -77,8 +77,8 @@ public class Member extends BaseTimeEntity {
@OneToMany(mappedBy = "member", cascade = CascadeType.ALL)
private List<NotificationRegion> notificationRegions = new ArrayList<>();

@OneToMany(mappedBy = "member", cascade = CascadeType.ALL)
private List<ConversationLike> conversationLikes = new ArrayList<>();
// @OneToMany(mappedBy = "member", cascade = CascadeType.ALL)
// private List<ConversationLike> conversationLikes = new ArrayList<>();

@Comment("온/오프라인 유무")
private Boolean session;
Expand Down

0 comments on commit 162658c

Please sign in to comment.