From 29eaa253a6a4e67f0a532c2821d04c8e99df8a8a Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 18 May 2026 21:11:12 +0200 Subject: [PATCH] =?UTF-8?q?fix(document):=20remove=20@BatchSize=20from=20@?= =?UTF-8?q?ManyToOne=20sender=20=E2=80=94=20not=20supported?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hibernate throws AnnotationException at startup when @BatchSize is placed on a @ManyToOne field. @BatchSize is only valid on collections (@OneToMany, @ManyToMany, @ElementCollection). The N+1 for sender is already covered by the @EntityGraph overrides on DocumentRepository. Co-Authored-By: Claude Sonnet 4.6 --- .../main/java/org/raddatz/familienarchiv/document/Document.java | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/src/main/java/org/raddatz/familienarchiv/document/Document.java b/backend/src/main/java/org/raddatz/familienarchiv/document/Document.java index d98165d2..3e8cac51 100644 --- a/backend/src/main/java/org/raddatz/familienarchiv/document/Document.java +++ b/backend/src/main/java/org/raddatz/familienarchiv/document/Document.java @@ -136,7 +136,6 @@ public class Document { @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "sender_id") - @BatchSize(size = 50) private Person sender; @ManyToMany(fetch = FetchType.LAZY)