#977: RechnungService.kt

projectforge-business/src/main/kotlin/org/projectforge/business/fibu/RechnungService.kt Service (Tuple Query), projectforge-business/src/main/kotlin/org/projectforge/business/fibu/RechnungService.kt 154 lines · 122 code · 25 comments · 7 blank
Spring @Service using JPA tuple queries for batch fetching invoice positions and cost assignments. fetchPositionen() bulk-loads positions for a list of invoices (both RechnungDO and EingangsrechnungDO) in a single query to avoid Hibernate lazy-loading N+1 problems. selectKostzuweisungen() fetches cost assignment data across invoices, resolving Kost1DO/Kost2DO via KostCache. Both methods use runIsolatedReadOnly for transactional isolation. SQL templates use Kotlin class simple names and parameterized IN clauses for batch efficiency.

Git History

868d6abb7 2026-01-01 Kai Reinhard: 2025 -> 2026
63081666f 2025-01-01 Kai Reinhard: Source file headers: 2024-> 2025.
c5b4b738b 2024-12-20 Kai Reinhard: WIP: CardDav server, image handling.
796d200c2 2024-11-11 Kai Reinhard: Migration stuff in progress... (all tests of all packages: OK).
372cb0066 2024-11-11 Kai Reinhard: Migration stuff in progress...
c7e47b6fa 2024-11-11 Kai Reinhard: Migration stuff in progress... (all tests of all packages: OK).