adamsaghy commented on code in PR #4700:
URL: https://github.com/apache/fineract/pull/4700#discussion_r2109748035
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java:
##########
@@ -32,30 +36,9 @@
public interface LoanTransactionRepository extends
JpaRepository<LoanTransaction, Long>, JpaSpecificationExecutor<LoanTransaction>
{
- String FIND_ID_BY_EXTERNAL_ID = "SELECT lt.id FROM LoanTransaction lt
WHERE lt.externalId = :externalId";
- String FIND_LOAN_ID_BY_ID = "SELECT lt.loan.id FROM LoanTransaction lt
WHERE lt.id = :id";
-
Optional<LoanTransaction> findByIdAndLoanId(Long transactionId, Long
loanId);
- @Query("""
- SELECT lt FROM LoanTransaction lt
- WHERE lt.loan.id = :loanId
- AND lt.typeOf IN :transactionTypes
- AND lt.id NOT IN :existingTransactionIds
- AND lt.reversed = false
- """)
- List<LoanTransaction>
findNewTransactionsByLoanIdAndTypeAndNotInIds(@Param("loanId") Long loanId,
- @Param("transactionTypes") List<LoanTransactionType>
transactionTypes,
- @Param("existingTransactionIds") List<Long>
existingTransactionIds);
-
- @Query("""
- SELECT lt FROM LoanTransaction lt
- WHERE lt.loan.id = :loanId
- AND lt.typeOf IN :transactionTypes
- AND lt.reversed = false
- """)
- List<LoanTransaction> findNewTransactionsByLoanIdAndType(@Param("loanId")
Long loanId,
- @Param("transactionTypes") List<LoanTransactionType>
transactionTypes);
+ List<LoanTransaction> findByLoan(Loan loan);
Review Comment:
I dont think we need this...
--
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]