You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "AshharAhmadKhan (via GitHub)" <gi...@apache.org> on 2026/04/07 18:45:08 UTC

[PR] FINERACT-2583: Batch entity lookups in holiday office selection, provisioning criteria, and collateral assembly [fineract]

AshharAhmadKhan opened a new pull request, #5748:
URL: https://github.com/apache/fineract/pull/5748

   ## Description
   
   JIRA: https://issues.apache.org/jira/browse/FINERACT-2583
   
   Three methods were executing per-iteration repository queries where all IDs were known before the loop:
   
   **HolidayWritePlatformServiceJpaRepositoryImpl.getSelectedOffices()**
   - `officeRepositoryWrapper.findOneWithNotFoundDetection(officeId)` was called on every iteration
   - Fix: collect IDs -> bulk `officeRepository.findAllById()` -> map lookup
   - `OfficeRepository` injected directly (same pattern as FINERACT-2579)
   
   **ProvisioningCriteriaAssembler.parseLoanProducts()**
   - `loanProductRepository.findById(productId).orElse(null)` was called on every product
   - Fix: collect IDs -> bulk `findAllById()` -> `map.getOrDefault(id, null)`
   - Preserves null-tolerant behavior of original (orElse(null))
   
   **CollateralAssembler.fromParsedJson()**
   - `codeValueRepository.findOneWithNotFoundDetection(collateralTypeId)` was called on every item
   - Fix: collect IDs -> bulk fetch -> map lookup
   - Throws `CodeValueNotFoundException` for missing IDs to replicate original behavior
   
   Same class of redundancy as FINERACT-2579. No logic changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2583: Batch entity lookups in holiday office selection, provisioning criteria, and collateral assembly [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #5748:
URL: https://github.com/apache/fineract/pull/5748


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org