标题几乎说明了一切。如果我有两个班级:
public class Account
{
public virtual Guid AccountId { get; set; }
public virtual string Name { get; set; }
}
public class VendorAccount : Account
{
public virtual string TaxId { get; set; }
}
我如何使用约定来创建VendorAccount表(或者一些近似值):
create table VendorAccount
(
AccountId uuid not null primary key references Account (AccountId),
TaxId varchar
);
我一直在忙着这几天。 IJoinedSubclassConvention
和ISubclassConvention
不允许您指定ID,所有其他约定似乎也无法达到这种情况。
我得到的最接近的将是account_id
列,这不是我想要的。