Hi Everyone, I use Fluent NHibernate, an I have a mapping for Class (Parent) and Subclass (SpecialParent). It is not based on discriminatory columns. The existence of a special parent record implies that the Parent is Special. I believe this is a table per subclass
Imagine the following tables: Parent --------- Id Name HasAttribute1 HasAttribute2 SpecialParent -------------------- HasAttributeA HasAttributeB HasAttributeC Class Parent ------------------- int Id string name ... Class SpecialParent : Parent int Parent_Id bool HasAttributeA bool HasAttributeB ... In my case, one can be a parent, and not be special. But one can be upgraded to special. My question is, if I want to save a "new" SpecialParent record, do I have to create a full instance of SpecialParent. I.e. var parent = session.Load<Parent>(myId); var specialP = new SpecialParent(); specialP.Id = parent.Id specialP.Name = parent.Name ... specialP.HasAttributeA = false; specialP.Has ... session.Save(specialP); Best Regards, Joe -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
