Skip to content

confused exception message when SubclassMap duplicated map a property of baseclass. #380

@phiree

Description

@phiree

Entities:

class Base
{
    public string Id{get;set;} 
    public string Name{get;set;}
}
class MyClass:Base
{
    public int Age{get;set;}
}

Mapping:

class BaseMap:ClassMap<Base>
{
     Id(x=>x.Id);
    Map(x=>x.Name);
}
class MyClassMap:SubClassMap<MyClass>
{
    Map(x=>x.Name);   <---------------------Wrong in runtime.
}

this incorrect map throw System.ArgumentOutOfRangeException . it is confused.
it maybe " don't mapping same property of base class"...

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