I have some classes that implement a generic base type. i.e:
public class TreeItem<TEntity> : Entity
where TEntity : TreeItem<TEntity>
{
public virtual IList<TEntity> Children{get;set;}
public virtual TEntity Parent {get;set;}
}
public class Category : TreeItem<Category>
{
public virtual string Description{get;set;}
}
...
When using Automapping and building the mappings, FluentNHibernate throws an exception saying "Association references unmapped class". Is using a generic base type incompatible with NHibernate? (I don't map TreeItem<> in my mapping).
IgnoreBase(typeof(TreeItem<>))takes care of this. - nakiya