After digging a little deeper, I found this fluent-nhibernate issue which explains that, as of r526 AddPart has been deprecated in favour of JoinedSubClass. After modifying my code to that shown below, I was able to get the modeling I was looking for.
In my base class map, I replaced the calls to AddPart with:
JoinedSubClass("MyBaseClassId", MySubClass1Map.AsJoinedSubClass());
JoinedSubClass("MyBaseClassId", MySubClass2Map.AsJoinedSubClass());
And my subclass maps changed to:
public class MySubClass1Map
{
public static Action<JoinedSubClassPart<MySubClass1>> AsJoinedSubClass()
{
return sub =>
{
sub.Map(x => x.MySubClass1Property);
};
}
}
public class MySubClass2Map
{
public static Action<JoinedSubClassPart<MySubClass2>> AsJoinedSubClass()
{
return sub =>
{
sub.Map(x => x.MySubClass2Property);
};
}
}
Mark M
2009-06-19 15:17:49