Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class instance should have DiscriminatorValue method #134

Closed
iGeX opened this issue May 12, 2012 · 0 comments
Closed

Class instance should have DiscriminatorValue method #134

iGeX opened this issue May 12, 2012 · 0 comments

Comments

@iGeX
Copy link

iGeX commented May 12, 2012

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

@hazzik hazzik added this to the 3.0.0 milestone Sep 18, 2020
@hazzik hazzik closed this as completed in 207f6e4 Sep 18, 2020
@hazzik hazzik changed the title No DiscriminatorValue method in ClassInstance Add DiscriminatorValue method to ClassInstance Oct 7, 2020
@hazzik hazzik changed the title Add DiscriminatorValue method to ClassInstance Class instance should have DiscriminatorValue method Oct 7, 2020
@hazzik hazzik added the feature label Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants