HI, I want to create tow entities for the same table without discriminator. Lets sey that my table represent Person and I would like to create 2 entity classes: Person and PersonExt. Person will contain most of the table columns like : name, Age, Adress ext. and the PersonExt class will inharit from the Person class and will contain mappinge to the rest of the columns in the Person Table. I don't want to create an additional mapping file for the PersonExt that will conatin mapping to all the Person filed again - but just mappings for the rest of the columns that I've not mapped to yet. Is it possible with NHibrnate? and if so, can you explain how? Public Class Person { public virtual string Name {get;set;} public virtual int Age {get;set;} public virtual string Address{get;set;} }
Public class PersonExt:Person { public virtual int NumOfChildren {get;set;} public virtual string FamilyStatus {get;set;} ......
}
Thanks!
|