kapilpanchal123 commented on code in PR #5126: URL: https://github.com/apache/fineract/pull/5126#discussion_r2465437818
########## fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferRequest.java: ########## @@ -0,0 +1,79 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.account.data; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import java.io.Serial; +import java.io.Serializable; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.apache.fineract.validation.constraints.Locale; + +@Getter +@Setter +@NoArgsConstructor +public class AccountTransferRequest implements Serializable { Review Comment: The DTO to Entity mapping should happen as late as possible and just before the Database insert so that the chances of Entity mutation is reduced. The logic that changes the values that will be finally saved to the database will happen in DTO space. Only the final values will be mapped from DTO to Entity and then saved immediately. -- 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]
