Have you read this?
http://blog.jagregory.com/2009/01/26/fluent-nhibernate-auto-mapping-and-base-classes/

If so have you tried:

WithConvention(convention =>
{
  convention.IsBaseType =
    type = type == typeof(Entity) || type == typeof(User);
});

On Fri, Jan 30, 2009 at 7:02 PM, Romain Verdier <[email protected]>wrote:

>
> Hello there,
>
> Using auto-mapping, how to ignore a base class that exists only in the
> model, and that we don't want in the database?
>
> The need is the same that for the typical base type all our entities
> derive from, (that we specify using Conventions.IsBaseType property)
> except that it only concern some of them.
>
> E.g. :
>
> class Entity { int Id }
> class abstract User : Entity { string FirstName, string LastName }
> class SomeKindOfUser : User { some attributes... }
> class OtherKindOfUser : User { some other attributes }
>
> From the previous model, I would like to end with only two tables
> SomeKindOfUser & OtherKindOfUser.
>
> Thanks!
>
> >
>

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