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
{{ message }}
Repository navigation
Regression in v10 - Forced Update of Required Property [MapToTarget] #899
The following UpdateRoleAsync method works just fine with Mapster 7.4 but when I updated to Mapster 10 I am getting Reference constraint violatation from EF core because Mapster is modifying every other propery to default value that are not present in the DTO. I have to roll back to Mapster 7.4 to save the app from huge breaking change. How to get the old behavior back??
changed the title [-]Regression in v10 - Forced Update of Required Property[/-][+]Regression in v10 - Forced Update of Required Property [MapToTarget][/+]on Mar 27, 2026
Hi, @md-redwan-hossain
It looks like this is related to the addition of required property support in v10.
I'll see if I can fix it. But it might just be disabled in future releases for MapToTarget and Projection.
Activity
[-]Mapster 10 breaks everything[/-][+]Regression in v10 - Forced Update of Required Property[/+][-]Regression in v10 - Forced Update of Required Property[/-][+]Regression in v10 - Forced Update of Required Property [MapToTarget][/+]DocSvartz commentedon Mar 27, 2026
Hi, @md-redwan-hossain
It looks like this is related to the addition of required property support in v10.
I'll see if I can fix it. But it might just be disabled in future releases for MapToTarget and Projection.
fix: Regression in v10 - Forced Update of Required Property MapsterMa…
fix: regression when update required property (#902)
DocSvartz commentedon Mar 29, 2026
It must been fixed in https://www.nuget.org/packages/Mapster/10.0.7-pre01