Search code examples
nhibernatefluent-nhibernatenhibernate-mapping

FluentNHibernate joined-subclass


What is the current method of implementing the joined-subclass structure with FluentNHibernate? By "current", I mean by not using deprecated methods such as JoinedSubClass or AddPart.

Thanks!


Solution

  • The recommended way to map a joined-subclass is to inherit from SubclassMap much in the same way you inherit from ClassMap for your non-subclass entities.

    It's described in the fluent mapping subclasses section on the wiki. For automapping please refer to Automapping Inheritance.