docs(geschichte): clarify readOnly=true tx purpose on getById()

Add inline comment explaining that readOnly=true lets lazy collections
resolve within the same transaction when getById() is called from getView().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-12 13:35:53 +02:00
parent 8e228d3c5f
commit d4c249193a

View File

@@ -68,6 +68,7 @@ public class GeschichteService {
return geschichteRepository.count(GeschichteSpecifications.hasStatus(GeschichteStatus.PUBLISHED)); return geschichteRepository.count(GeschichteSpecifications.hasStatus(GeschichteStatus.PUBLISHED));
} }
// readOnly = true: lazy collections resolve within the same tx when called from getView()
@Transactional(readOnly = true) @Transactional(readOnly = true)
public Geschichte getById(UUID id) { public Geschichte getById(UUID id) {
Geschichte g = geschichteRepository.findById(id) Geschichte g = geschichteRepository.findById(id)