Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
With the current implementation and the configured JPA associations, when loading a single Loan entity from the database through JPA, it'll eagerly fetch all the related LoanCollateralManagement entities.
Generally speaking we should aim to avoid EAGER loading to prevent performance bottlenecks to form and we should only use it in places where it's really justified.
Unfortunately by marking this Loan -> LoanCollateralManagement relationship eagerly fetched it starts kind of a chain reaction of loading a lot more data than needed.
The whole relationship chain looks the following:
Loan -> LoanCollateralManagement -> ClientCollateralManagement -> CollateralManagementDomain -> ApplicationCurrency
That's a huge slice of data.
The idea of this ticket is to adjust this behavior and switch the Loan -> LoanCollateralManagement relationship to be a LAZY relationship so different use cases have the chance to fetch only the data they'll need.
This will definitely speed up the Loan related operations.
Attachments
Issue Links
- links to