adamsaghy commented on code in PR #2739:
URL: https://github.com/apache/fineract/pull/2739#discussion_r1023678632
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformServiceImpl.java:
##########
@@ -109,89 +103,23 @@ public Collection<LoanDelinquencyTagHistoryData>
retrieveDelinquencyRangeHistory
@Override
public CollectionData calculateLoanCollectionData(final Long loanId) {
- final LocalDate businessDate = DateUtils.getBusinessLocalDate();
final Optional<Loan> optLoan = this.loanRepository.findById(loanId);
CollectionData collectionData = CollectionData.template();
if (optLoan.isPresent()) {
+ final LocalDate businessDate = DateUtils.getBusinessLocalDate();
final Loan loan = optLoan.get();
+ loan.initializeLazyBasicCollections();
Review Comment:
I would rather put a `@Transactional` annotation on the method then manually
try to fetch the lazy associations.
--
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]