You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ar...@apache.org on 2023/04/13 13:27:15 UTC

[fineract] branch develop updated: FINERACT-1724: Loading the entire loan with relationships in case of loan cob

This is an automated email from the ASF dual-hosted git repository.

arnold pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 158d7c972 FINERACT-1724: Loading the entire loan with relationships in case of loan cob
158d7c972 is described below

commit 158d7c97262183adf88175d29e68b7c5e8b7a79e
Author: Arnold Galovics <ga...@gmail.com>
AuthorDate: Thu Apr 13 13:39:27 2023 +0200

    FINERACT-1724: Loading the entire loan with relationships in case of loan cob
---
 .../java/org/apache/fineract/cob/service/LoanReloadService.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanReloadService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanReloadService.java
index b4fb9f244..4e86b0d01 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanReloadService.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanReloadService.java
@@ -21,14 +21,14 @@ package org.apache.fineract.cob.service;
 import lombok.RequiredArgsConstructor;
 import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
 import org.apache.fineract.portfolio.loanaccount.domain.Loan;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository;
+import org.apache.fineract.portfolio.loanaccount.service.LoanAssembler;
 import org.springframework.stereotype.Component;
 
 @Component
 @RequiredArgsConstructor
 public class LoanReloadService implements ReloadService<Loan> {
 
-    private final LoanRepository loanRepository;
+    private final LoanAssembler loanAssembler;
 
     @Override
     public <S extends AbstractPersistableCustom> boolean canReload(S input) {
@@ -37,7 +37,7 @@ public class LoanReloadService implements ReloadService<Loan> {
 
     @Override
     public Loan reload(Loan input) {
-        return loanRepository.findById(input.getId()).get();
+        return loanAssembler.assembleFrom(input.getId());
     }
 
 }