FINERACT-1724: Fix Multi Disburse internal server error

- [x] Fix wrong mapping
- [x] Add empty hashmap for initialization
This commit is contained in:
Janos Haber
2023-08-02 15:57:06 +02:00
committed by Adam Saghy
parent 3869c19296
commit dbe71b8f7e
2 changed files with 2 additions and 3 deletions
@@ -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<>();
@@ -22,7 +22,6 @@ import jakarta.persistence.Column;
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;
@@ -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)