AshharAhmadKhan opened a new pull request, #5880:
URL: https://github.com/apache/fineract/pull/5880
## Description
When a provisioning entry exists but no loans have been disbursed yet,
calling GET /provisioningentries/{id} returns HTTP 500. The root cause
is an INNER JOIN in PROVISIONING_ENTRY_SUM_RESERVED_SCHEMA — when
m_loanproduct_provisioning_entry has no rows for the given history ID,
the join returns zero rows and Spring's queryForObject() throws
EmptyResultDataAccessException.
Fix: change INNER JOIN to LEFT JOIN so the query always returns one row
(totalReserved = NULL when no loan products exist), mapping cleanly
without throwing.
Picks up the work from #5621.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]