📅  最后修改于: 2022-03-11 14:58:12.907000             🧑  作者: Mango
ModelMapper modelMapper = new ModelMapper();
modelMapper.addMappings(new PropertyMap() {
@Override
protected void configure() {
skip(destination.getFatherDetailsEntity().getUser());
}
});
user=modelMapper.map(request, UserEntity.class);
System.out.println("Request=>" +user);
OUTPUT: UserEntity{userId=0, firstName='null', lastName='Ahsan', userName='ArslanAhsan2', creationTime=null, fatherDetailsEntity=FatherDetailsEntity{id=null, fatherName='ABCD', cnic='38201'}}