nidhiii128 commented on code in PR #5562:
URL: https://github.com/apache/fineract/pull/5562#discussion_r2869667346


##########
fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java:
##########
@@ -112,6 +113,67 @@ public static Staff fromJson(final Office staffOffice, 
final JsonCommand command
         return new Staff(staffOffice, firstname, lastname, externalId, 
mobileNo, isLoanOfficer, isActive, joiningDate);
     }
 
+    public static Staff fromRequest(final Office staffOffice, final 
StaffRequest request) {

Review Comment:
   Hi @vidakovic , I completely agree with your point. The manual boilerplate 
we have for these updates is definitely not ideal and makes the code harder to 
maintain. Using a library like Javers would be a much cleaner and more 
professional way to handle object diffing across Fineract. I've followed the 
current fromRequest pattern here just to stay consistent with the existing 
modules for now, but I'm definitely in favor of the community moving toward a 
better solution like the one you suggested.



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