Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

No DiscriminatorValue method in ClassInstance #134

Open
iGeX opened this Issue · 0 comments

1 participant

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.