fix(document): remove @BatchSize from @ManyToOne sender — not supported

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 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-18 21:11:12 +02:00
committed by marcel
parent f470a39ad2
commit 69b3c663c0

View File

@@ -136,7 +136,6 @@ public class Document {
@ManyToOne(fetch = FetchType.LAZY) @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "sender_id") @JoinColumn(name = "sender_id")
@BatchSize(size = 50)
private Person sender; private Person sender;
@ManyToMany(fetch = FetchType.LAZY) @ManyToMany(fetch = FetchType.LAZY)