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-fluent-nhibernate
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(...) // ^  ^
    }
}

-- 
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.

Reply via email to