Update User class to use EAGER fetching for articles relationship
This commit is contained in:
@@ -18,7 +18,7 @@ public class User {
|
||||
@NotNull
|
||||
private String email;
|
||||
|
||||
@OneToMany(mappedBy="author", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@OneToMany(mappedBy="author", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
|
||||
private List<Article> articles;
|
||||
|
||||
public User() {}
|
||||
|
||||
Reference in New Issue
Block a user