[ 
https://issues.apache.org/jira/browse/FINERACT-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Saghy resolved FINERACT-2190.
----------------------------------
    Resolution: Fixed

> Avoid recreation of loan repayment schedule periods
> ---------------------------------------------------
>
>                 Key: FINERACT-2190
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2190
>             Project: Apache Fineract
>          Issue Type: Improvement
>            Reporter: Adam Saghy
>            Priority: Minor
>             Fix For: 1.12.0
>
>
> There are operations where all of the existing loan repayment schedule 
> periods are discarded (List.clear()) and recreated (added to the Loan entity 
> loan repayment schedule periods one by one).
> It often causes performance and / or failed removal of orphan entries by 
> Eclipselink.
> We should identify these places and review them whether removal is absolutely 
> necessary!
> *We should rather focus on updating the existing ones instead of  removing 
> and adding new ones!*
>  
> *Acceptance criteria*
>  * Review places where we discard all existing loan repayment schedule 
> periods and rework them to rather update the existing ones than removing and 
> recreating them from scratch!
> *DEV notes*
>  * The easiest way to identify these issues by looking for List.clear() 
> operations on the repayment periods list of the loan or creating a new unique 
> constraint on the m_loan_repayment_schedule table on the loan_id + 
> installmentcolumns and run the tests.
>  * We can use the installment number (period number) to identify matching 
> installments and
>  ** update the existing ones (if installment number matches)
>  ** Remove the orphan ones (if installment number does not exist on the 
> source list)
>  ** Create the non existing ones (if installment number does not exist on the 
> target list)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to