Add fetch = FetchType.LAZY to all relationship declarations.
Change-Id: I22435019234ed092ae07ffd8e61b212416b4dd0f
diff --git a/src/main/java/eu/mulk/mulkcms2/entity/LegacyJournalComment.java b/src/main/java/eu/mulk/mulkcms2/entity/LegacyJournalComment.java
index 8516b14..a1bfd95 100644
--- a/src/main/java/eu/mulk/mulkcms2/entity/LegacyJournalComment.java
+++ b/src/main/java/eu/mulk/mulkcms2/entity/LegacyJournalComment.java
@@ -5,6 +5,7 @@
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
@@ -153,7 +154,7 @@
.hash(id, uuid, date, body, author, email, website, spamP, submitterIp, submitterUserAgent);
}
- @ManyToOne
+ @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "entry_id", referencedColumnName = "id", nullable = false)
public LegacyJournalEntry getJournalEntry() {
return journalEntry;