Skip to content

Class instance should have DiscriminatorValue method #134

@iGeX

Description

@iGeX

Hi

Class mapping can have "discriminator-value" as well as subclass, but there is no way to specify it in automapping class convention inherited from IClassConvention. Reason for this is lack of DiscriminatorValue setting method in ClassInstance class and it's corresponding IClassInstance interface.

Problem can be solved by adding following method in ClassInstance class, and it's signature in IClassInstance interface

public new void DiscriminatorValue(object value)
{
    mapping.Set(x => x.DiscriminatorValue, Layer.Conventions, value);
}

P.S. Method taken from similar SubclassInstance class

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions