dany giguere
01/06/2022, 10:06 PM@JsonManagedReference
@OneToMany(cascade = [CascadeType.ALL], mappedBy = "user")
var posts: List<Post>?
and in Post I have :
@JsonBackReference
@ManyToOne(fetch = FetchType.LAZY)
val user: User
now I call call /api/users and I see all the users with their posts. So apparently it’s eager loading the relationships by default, because I’m not asking for the relationship in my controller. I have tried setting the
fetch = FetchType.LAZY
or