Using the static Adapt<> method, I adapt from a concrete type to an interface (all properties defined w/ get & set).
All is well and the expected property values are transported to the generated type.
Upon adapting from a 2nd concrete type to the newly minted instance (generated from the interface), the 2nd adaptation nullifies a member of the interface instance -- presumably b/c the 2nd concrete type defines no matching member.
7.20 leaves the populated interface property in peace
7.30 nullifies the previously populated interface property
If this isn't intended behavior, it's a pretty dangerous regression. If it is intended behavior, it's
- a breaking change, so more appropriate in a major version revision and
- a change that needs to be called out in notes, given past [expected] behavior.
I'm a big fan and rely heavily on Mapster and, fortunately, found the issue during testing and before releasing to production.
Please educate me on the expected behavior in v7.30 when adapting from Type2 to Type1, where Type2 does not define a property that's present [and populated] in Type1?
Thanks much and apologies if this duplicates an existing issue.
Using the static
Adapt<>method, I adapt from a concrete type to an interface (all properties defined w/get&set).All is well and the expected property values are transported to the generated type.
Upon adapting from a 2nd concrete type to the newly minted instance (generated from the interface), the 2nd adaptation nullifies a member of the interface instance -- presumably b/c the 2nd concrete type defines no matching member.
7.20leaves the populated interface property in peace7.30nullifies the previously populated interface propertyIf this isn't intended behavior, it's a pretty dangerous regression. If it is intended behavior, it's
I'm a big fan and rely heavily on Mapster and, fortunately, found the issue during testing and before releasing to production.
Please educate me on the expected behavior in
v7.30when adapting fromType2toType1, whereType2does not define a property that's present [and populated] inType1?Thanks much and apologies if this duplicates an existing issue.