adamsaghy commented on code in PR #3030:
URL: https://github.com/apache/fineract/pull/3030#discussion_r1131096565


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepository.java:
##########
@@ -18,10 +18,14 @@
  */
 package org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain;
 
+import java.util.Optional;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
 
 public interface LoanRescheduleRequestRepository
         extends JpaRepository<LoanRescheduleRequest, Long>, 
JpaSpecificationExecutor<LoanRescheduleRequest> {
 
+    @Query("select lrr.loan.id from LoanRescheduleRequest lrr where lrr.id = 
:rescheduleRequestId")
+    Optional<Long> getLoanByRescheduleRequestId(Long rescheduleRequestId);

Review Comment:
   Minor, but it might worth to rename it to `getLoanIdByRescheduleRequestId`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to