I have two entities one is Video and other is Director and this is the relation between them
Director
@OneToMany(mappedBy = "director",cascade = CascadeType.ALL, orphanRemoval = true)
private List<Video> videos;
Video
@ManyToOne
@JoinColumn(name="director_id", nullable=false)
private Director director;
The issue is that I now have loop when I use Get on either Video or Director, its easy to get rid of it by using @JsonIgnore in one of the entities, but I want to be able to recive both Video with infromation about Director and Director with all of his Videos, so using @JsonIgnore is not an option here. Is there any way for me to be able to use GET on both of them and recive all of the informations these entities have inside?