FINERACT-2421: Add equals() and hashCode() to LoanTransaction#5855
FINERACT-2421: Add equals() and hashCode() to LoanTransaction#5855Harshdhall01 wants to merge 1 commit into
Conversation
638fc79 to
78ae5e4
Compare
|
@Harshdhall01 Please use FINERACT-2421 for this. |
78ae5e4 to
771c404
Compare
|
Thank you @adamsaghy! Sir Updated the commit and PR title to FINERACT-2421. |
|
The build failure in fineract-progressive-loan is a pre-existing |
It fails because now there is a value equality method available and it tries to enforce it now :) You should fix these issues by modifying to use from now on the equals method |
Description
LoanTransactionwas missingequals()andhashCode()implementations,flagged by a long-standing TODO comment in the code:
The parent class
AbstractPersistableCustomintentionally omits these methods(documented in its own Javadoc). Added id-based implementations consistent with
the pattern already used in
LoanDisbursementDetails, ensuring correct behaviorif
LoanTransactionis ever used in hash-based collections.Changes
equals()based on entity id with null-safety for unsaved entitieshashCode()based on entity idjava.util.ObjectsimportNote: JIRA ticket will be linked once Apache JIRA account approval is received.
I am exploring this codebase as part of my DMP 2026 (C4GT) application for the
"Dynamic Pricing of Micro-loans Using Reinforcement Learning" project under
openMF/Mifos. The loan module is directly relevant as it contains the core
transaction logic that my RL environment will model for dynamic pricing decisions.
Checklist