Skip to content

Commit

Permalink
FINERACT-1724: Fix Multi Disburse internal server error
Browse files Browse the repository at this point in the history
- [x] Fix wrong mapping
- [x] Add empty hashmap for initialization
  • Loading branch information
b0c1 authored and adamsaghy committed Aug 2, 2023
1 parent 3869c19 commit dbe71b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
private Set<LoanInterestRecalcualtionAdditionalDetails> loanCompoundingDetails = new HashSet<>();

@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER, mappedBy = "loanRepaymentScheduleInstallment")
private Set<PostDatedChecks> postDatedChecks;
private Set<PostDatedChecks> postDatedChecks = new HashSet<>();

@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY, mappedBy = "installment")
private Set<LoanInstallmentCharge> installmentCharges = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import java.math.BigDecimal;
import java.time.LocalDate;
Expand All @@ -40,7 +39,7 @@ public class PostDatedChecks extends AbstractPersistableCustom {
@ManyToOne(optional = false)
@JoinColumn(name = "loan_id", referencedColumnName = "id", nullable = false)
private Loan loan;
@OneToOne(optional = false)
@ManyToOne(optional = false)
@JoinColumn(name = "repayment_id", referencedColumnName = "id", nullable = false)
private LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment;
@Column(name = "account_no", nullable = false, length = 10)
Expand Down

0 comments on commit dbe71b8

Please sign in to comment.