OK, obviously this scenario is too non-standard to get a response ... Ignoring the goofy database structure, how should I be mapping abstract base classes & their respective child classes? (Assuming a single table that holds data for multiple child types)
Thanks On Jan 19, 2:02 pm, fel0nious <[email protected]> wrote: > does anyone have any insight or advice?? > > On Jan 18, 1:28 pm, fel0nious <[email protected]> wrote: > > > > > I have a unique (i think) problem at hand. > > > The database I'm having to use has multiple different kinds of Entity > > tables > > > In code, I'd like to have an EntityBase class from which all > > subsequent entities derive. > > > The column names & sequences used to generate the ID's for these > > tables are not all the same. > > > So how do I map this scenario? Can I, even? > > Should I NOT map EntityBase at all, and only map the children, either > > duplicating code, or using an extension (like in the S.O. post below) > > to map common fields?? > > > I stumbled upon this > > article:http://stackoverflow.com/questions/655494/inheritance-mapping-with-fl... > > but that isn't helping. > > > public BaseEntityMap : ClassMap<BaseEntity> > > { > > public BaseEntityMap() > > { > > ID(.....) // ?? > > } > > > } > > > public ChildEntityMap : SubclassMap<ChildEntity> > > { > > public ChildEntityMap() > > { > > ID(...) // does not exist for SubclassMap > > Table(...) // ^ ^ > > } > > > }- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en.
