You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
"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");
Where the method Update would handle the mapping. Is there a way to achieve this with Mapster?"
Beta Was this translation helpful? Give feedback.
All reactions