adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1040885753
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##########
@@ -224,12 +227,11 @@ public class Client extends
AbstractAuditableWithUTCDateTimeCustom {
@OneToMany(mappedBy = "client", cascade = CascadeType.ALL, orphanRemoval =
true, fetch = FetchType.LAZY)
private Set<ClientCollateralManagement> clientCollateralManagements = new
HashSet<>();
- public static Client createNew(final AppUser currentUser, final Office
clientOffice, final Group clientParentGroup, final Staff staff,
+ public static Client instance(final AppUser currentUser, final Office
clientOffice, final Group clientParentGroup, final Staff staff,
final Long savingsProductId, final CodeValue gender, final
CodeValue clientType, final CodeValue clientClassification,
- final Integer legalForm, final JsonCommand command) {
+ final Integer legalForm, final ExternalId externalId, final
JsonCommand command) {
Review Comment:
Pls move this whole logic into the service. Inside an entity we should not
fetch data out of command. The command parameter should never be reach an
entity. it should be processed in the service.
--
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]