You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Adam Saghy (Jira)" <ji...@apache.org> on 2025/12/18 08:53:00 UTC
[jira] [Updated] (FINERACT-2324) Getting rid of using `loan.getLoanTransactions()`
[ https://issues.apache.org/jira/browse/FINERACT-2324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Saghy updated FINERACT-2324:
---------------------------------
Fix Version/s: (was: 1.14.0)
> Getting rid of using `loan.getLoanTransactions()`
> -------------------------------------------------
>
> Key: FINERACT-2324
> URL: https://issues.apache.org/jira/browse/FINERACT-2324
> Project: Apache Fineract
> Issue Type: Improvement
> Affects Versions: 1.11.0, 1.12.1
> Reporter: Adam Saghy
> Assignee: Adam Saghy
> Priority: Major
>
> Unfortunately `loan.getLoanTransactions()` is causing performance issues for long-term loans:
> * A loan with term of 2 years
> * 1 repayment per month
> * on the 23th month could have 700+ transactions
> ** Accruals / Amortization transactions
>
> On the loan entity the loan transactions association fetches all the existing loan transactions, including:
> * Monetary transactions (very often needed)
> ** To decide whether a new monetary transaction is considered as backdated or not…
> ** Reprocess loan transactions and rebuild loan repayment schedule
> ** Fetch monetary transactions of the loan
> * Non-monetary transactions (often needed, but not always!)
> ** Recalculate accruals… usually it is a side effect of backdated transaction or reversal
> * Reverted transactions (rarely needed)
> ** Fetch and include reverted transactions…alongside the not-reverted monetary ones
> * Reverted non-monetary transactions (rarely needed)
> ** Fetch and include reverted accruals / etc, alongside with the “current” ones…
>
> Unfortunately EclipseLink does not support filtering on associations, so we just simply cannot have multiple associations which are lazily fetches sub list of transactions based on transaction type or any other criteria.
>
> The idea is to slowly move away entirely from “loan.getLoanTransactions()” and fetch required data via JPQL queries.
>
> *Acceptance criteria*
> * Move away from usage of “loan.getLoanTransactions()”
--
This message was sent by Atlassian Jira
(v8.20.10#820010)