We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c641d4 commit 8eb544bCopy full SHA for 8eb544b
1 file changed
src/main/java/alexp/blog/model/Post.java
@@ -46,7 +46,8 @@ public class Post {
46
@OrderBy("name ASC")
47
private Collection<Tag> tags = new ArrayList<>();
48
49
- @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "post")
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "post")
50
+ @org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.EXTRA)
51
@OrderBy("dateTime ASC")
52
public List<Comment> comments = new ArrayList<>();
53
0 commit comments