I am building an application with heavy inheritance and have a part where there exists classes, A, B and C with:
class A
class B : A
class C : B
I implemented subclass mapping as a table-per-subclass style for class B as follows:
class BMap : SubclassMap<B>
{
public BMap()
{
Extends<A>();
KeyColumn("ID");
}
}
Which works perfectly. However, when I want to implement C as follows:
class CMap : SubclassMap<C>
{
public CMap()
{
Extends<B>();
KeyColumn("ID");
}
}
It results in the error
Duplicate class/entity mapping
I browsed the Hibernate/NHibernate forum but could not find an answer to this problem.