Skip to content

Mapping broke when upgrading from 12.0.0 to 12.0.1 #4316

@ahmednfwela

Description

@ahmednfwela

Mapping configuration

//Mappings for properties A,B,C, ...
CreateMap<ProjectBase, SimpleProjectInfoVMBase>();
//Mappings for some extra properties (E,F,G) + the base (A,B,C,...)
CreateMap<ProjectBase, SimpleProjectInfoWithCommsVMBase>()
    .IncludeBase<ProjectBase, SimpleProjectInfoVMBase>();
//Mappings for some extra properties (X,Y,Z) + the base (A,B,C,...) + (E,F,G)
CreateMap<ProjectBase, SimpleProjectInfoWithCommsVM<ObjectId>>()
    //.IncludeBase<ProjectBase, SimpleProjectInfoVMBase>()
    .IncludeBase<ProjectBase, SimpleProjectInfoWithCommsVMBase>();

Version: 12.0.1

Expected behavior

Version 12.0.0 used to work without the commented line

//.IncludeBase<ProjectBase, SimpleProjectInfoVMBase>()

Actual behavior

Version 12.0.1 fails to validate (when calling AssertConfigurationIsValid) without the commented line
saying it can't find mappings for the base class for properties A,B,C, ...


Looking at the changes introduced in 12.0.1, I think this bug might be because of #4097 , but I have no idea why

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions