Multiple discriminator columns for multi-level inheritance...

2 posts, 0 answers
  1. Phil
    Phil avatar
    2 posts
    Member since:
    Nov 2011

    Posted 06 May 2013 Link to this post

    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)?
  2. Boris Georgiev
    Boris Georgiev avatar
    190 posts

    Posted 09 May 2013 Link to this post

    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 >>
  3. DevCraft banner
Back to Top