FINERACT-2486: Fix guarantor endpoint returning savingsAccount.id=0 for group savings (#5482)

This commit is contained in:
Ralph Hopman
2026-02-14 16:16:06 -06:00
committed by GitHub
parent 05662e64d5
commit 8a61e30a45
2 changed files with 149 additions and 2 deletions
@@ -130,9 +130,9 @@ public class GuarantorReadPlatformServiceImpl implements GuarantorReadPlatformSe
.append(" left JOIN m_code_value cv on g.client_reln_cv_id = cv.id")//
.append(" left JOIN m_guarantor_funding_details gfd on g.id = gfd.guarantor_id")//
.append(" left JOIN m_portfolio_account_associations aa on gfd.account_associations_id = aa.id and aa.is_active = true and aa.association_type_enum = ?")//
.append(" left JOIN m_savings_account sa on sa.id = aa.linked_savings_account_id ")//
.append(" left join m_guarantor_transaction gt on gt.guarantor_fund_detail_id = gfd.id") //
.append(" left join m_deposit_account_on_hold_transaction oht on oht.id = gt.deposit_on_hold_transaction_id");
.append(" left join m_deposit_account_on_hold_transaction oht on oht.id = gt.deposit_on_hold_transaction_id")//
.append(" left JOIN m_savings_account sa on sa.id = COALESCE(aa.linked_savings_account_id, oht.savings_account_id)");
public String schema() {
return this.sqlBuilder.toString();