Mapster icon indicating copy to clipboard operation
Mapster copied to clipboard

How Map From A Method Like Update ?

Open AmBplus opened this issue 4 months ago • 0 comments

"I’m working with a complex model. When I need to update an instance of this model, I want to avoid changing certain fields like createDate. Currently, I can't achieve this by using a constructor with global settings to use the constructor. However, I’d like to specify a custom method for mapping instead of relying solely on the constructor. How can I achieve this using Mapster?

For example, I’d like to do something like:

TypeAdapterConfig.GlobalSettings.Default.MapToConstructor(true).UseMethod("Update"); i mean do it automate Where the method Update would handle the mapping. Is there a way to achieve this with Mapster?"

AmBplus avatar Mar 19 '24 21:03 AmBplus