adamsaghy commented on code in PR #2739:
URL: https://github.com/apache/fineract/pull/2739#discussion_r1023676642
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallment.java:
##########
@@ -140,6 +140,9 @@ public class LoanRepaymentScheduleInstallment extends
AbstractAuditableWithUTCDa
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch =
FetchType.LAZY, mappedBy = "installment")
private Set<LoanInstallmentCharge> installmentCharges = new HashSet<>();
+ @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch =
FetchType.EAGER, mappedBy = "installment")
+ private Set<LoanTransactionToRepaymentScheduleMapping>
loanTransactionToRepaymentScheduleMappings = new HashSet<>();
Review Comment:
I am a little hesitant whether we need to fetch the mapping eagerly. Can you
tell me why did you decide to do so? Eager loading only required if we would
read an association when the entity is already detached. I dont think that
would happen here (or should)...i guess we need to make sure this entity is
used in transactional block
--
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]