vidakovic commented on code in PR #2701:
URL: https://github.com/apache/fineract/pull/2701#discussion_r1010000208


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java:
##########
@@ -226,9 +225,11 @@ public class Loan extends 
AbstractAuditableWithUTCDateTimeCustom {
     @JoinColumn(name = "loanpurpose_cv_id", nullable = true)
     private CodeValue loanPurpose;
 
-    @ManyToOne(fetch = FetchType.EAGER)
-    @JoinColumn(name = "loan_transaction_strategy_id", nullable = true)
-    private LoanTransactionProcessingStrategy transactionProcessingStrategy;
+    @Column(name = "loan_transaction_strategy_code", nullable = false)
+    private String transactionProcessingStrategyCode;
+
+    @Column(name = "loan_transaction_strategy_name")
+    private String transactionProcessingStrategyName;

Review Comment:
   Strictly speaking it's not necessary (and we do have an "enum"), but it's 
there for backward compatibility (read: REST API) with the user interfaces 
(they used the descriptive field in the old lookup table).
   The point here is to avoid any lookups/joins for simple stuff like that and 
that adding custom transaction strategies is just a matter of creating a custom 
module with the necessary Spring/Boot configuration (no additional Liquibase 
migrations etc.).
   This column is only descriptive and not used for any lookups of strategies, 
should be fine as is and is the best way I think to provide descriptive texts 
for all strategies (even those that we don't know of yet).



-- 
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]

Reply via email to