Skip to content

Commit

Permalink
Merge pull request #123 from Codiary-UMC-6th/feature/#119-authorsList…
Browse files Browse the repository at this point in the history
…-JPA-error-fix

Fix: Post entity fix
  • Loading branch information
ParkJh38 authored Aug 9, 2024
2 parents e3d2e22 + 7a7f853 commit e3538bd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ public class Post extends BaseEntity {
private List<Categories> categoriesList = new ArrayList<>();

@Builder.Default
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true)
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
private List<PostFile> postFileList = new ArrayList<>();

@Builder.Default
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
private List<Authors> authorsList = new ArrayList<>();

@Builder.Default
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true)
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
private List<Comment> commentList = new ArrayList<>();


@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true)
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
private List<Bookmark> bookmarkList = new ArrayList<>();

public void setProject(Project project) { this.project = project;}
Expand Down

0 comments on commit e3538bd

Please sign in to comment.