4 lab alga jsonIgnore

This commit is contained in:
Павел Сорокин 2023-04-17 18:34:47 +04:00
parent a22ff8d8bb
commit dcb1c381c9
2 changed files with 0 additions and 3 deletions

View File

@ -17,11 +17,9 @@ public class Comment {
private String Text;
@ManyToOne(fetch = FetchType.EAGER,cascade = CascadeType.MERGE)
@JsonIgnore
private Post post;
@ManyToOne(fetch = FetchType.EAGER,cascade = CascadeType.MERGE)
@JsonIgnore
private User user;
public Comment()

View File

@ -28,7 +28,6 @@ public class Post {
private byte[] image;
@ManyToOne(fetch = FetchType.EAGER,cascade = CascadeType.MERGE)
@JsonIgnore
private User user;
@OneToMany(mappedBy = "post",fetch = FetchType.EAGER,cascade = {CascadeType.MERGE,CascadeType.REMOVE},orphanRemoval = true)