perf(document): EAGER→LAZY migration with @EntityGraph + @BatchSize (#467) #622

Merged
marcel merged 19 commits from worktree-feat+issue-467-lazy-fetch-entity-graph into main 2026-05-19 09:23:32 +02:00
Showing only changes of commit e677756139 - Show all commits

View File

@@ -136,6 +136,7 @@ public class Document {
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "sender_id")
@BatchSize(size = 50)
private Person sender;
@ManyToMany(fetch = FetchType.LAZY)
@@ -148,6 +149,7 @@ public class Document {
@CollectionTable(name = "document_training_labels", joinColumns = @JoinColumn(name = "document_id"))
@Column(name = "label")
@Enumerated(EnumType.STRING)
@BatchSize(size = 50)
@Builder.Default
private Set<TrainingLabel> trainingLabels = new HashSet<>();