Skip to content

Potential regression from minor versions 7.20 --> 7.30 #485

Description

@agause

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

  1. a breaking change, so more appropriate in a major version revision and
  2. 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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions