Fixed compilation error
This commit is contained in:
parent
fbefae05ec
commit
cd51e118df
persistence-modules/spring-data-jpa-5/src/main/java/com/baeldung
|
@ -17,6 +17,10 @@ public class CustomerDto {
|
|||
this.phone = c.phone;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public Customer convertToEntity() {
|
||||
Customer c = new Customer();
|
||||
c.id = id;
|
||||
|
|
|
@ -38,7 +38,7 @@ public class CustomerService {
|
|||
}
|
||||
|
||||
public Customer updateCustomer(CustomerDto dto) {
|
||||
Customer myCustomer = repo.findById(dto.id);
|
||||
Customer myCustomer = repo.findById(dto.getId());
|
||||
mapper.updateCustomerFromDto(dto, myCustomer);
|
||||
repo.save(myCustomer);
|
||||
return myCustomer;
|
||||
|
|
Loading…
Reference in New Issue