Inheritance 如何在使用ActiveRecord时将类转换为继承的类

Inheritance 如何在使用ActiveRecord时将类转换为继承的类,inheritance,activerecord,asp.net-mvc-2,castle-activerecord,Inheritance,Activerecord,Asp.net Mvc 2,Castle Activerecord,我有一个类项目和一个类案例,它们继承自项目。 当有一个项目列表时我们可能会在以后决定对所选项目做一个案例。我怎样才能做到这一点 项目: [ActiveRecord (Table = "projects", Lazy = true), JoinedBase] public class Project : ActiveRecordValidationBase<Project> { private int _id; [PrimaryKey(PrimaryKe

我有一个类
项目
和一个类
案例
,它们继承自
项目
。 当有一个
项目列表时
我们可能会在以后决定对所选
项目
做一个
案例
。我怎样才能做到这一点

项目:

[ActiveRecord (Table = "projects", Lazy = true), JoinedBase]
public class Project : ActiveRecordValidationBase<Project>
{
        private int _id;
        [PrimaryKey(PrimaryKeyType.Identity, "id")]
        public virtual int Id
        {
            get { return _id; }
            set { _id = value; }
        }
}
我希望我的主题和问题是清楚的:)

请看, 它谈到了鉴别器,但原则上答案是一样的:要么通过重构避免这种情况,要么用原始SQL绕过它

 [ActiveRecord(Table = "cases", Lazy = true)]
    public class Case : Project
    {
        private int _caseId;
        [JoinedKey("case_id")]
        public virtual int CaseId
        {
            get { return _caseId; }
            set { _caseId = value; }
        }
    }