This is a migrated thread and some comments may be shown as answers.

Multiple discriminator columns for multi-level inheritance...

1 Answer 82 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Phil
Top achievements
Rank 1
Phil asked on 06 May 2013, 07:17 PM
public abstract class Base
{
    public virtual string FEE_IND { get; set; }
    public virtual string REC_PAY { get; set; }
}

//  FEE_IND == "03"
public abstract class Child : Base
{}

//  FEE_IND == "03"
//  REC_PAY == "P"
public class ChildChild : Child
{}

How do I map this situation with OpenAccess (either fluent or visual developer)?

1 Answer, 1 is accepted

Sort by
0
Boris Georgiev
Telerik team
answered on 09 May 2013, 03:40 PM
Hi Phil,

I am afraid that such scenario is not supported by OpenAccess ORM. You could have only one discriminator column in a table and this column should not be mapped to a property. Also OpenAccess handled automatically discriminator column, so the column couldn't be handled manually.

As a workaround I could recommend you to use two columns that are mapped to properties and set their values in the class constructor.

Currently we are not scheduled any changes for the discriminator column behavior in our backlog, that is why I advise you to post a feature request in our Ideas and Feedback Portal, so other users can also see it and vote for it. Once it gathers votes from the community, we are going to prioritize it accordingly and schedule it for implementation.

If you have any further questions, do not hesitate to contact us again.

Kind regards,
Boris Georgiev
the Telerik team
Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
Tags
General Discussions
Asked by
Phil
Top achievements
Rank 1
Answers by
Boris Georgiev
Telerik team
Share this question
or