title: NHibernate Discriminated Subclasses of a Joined-Subclass
body: <p>Here's my heirarchy:</p>
  
  <pre>
  class abstract Entity { /*members*/ } // mapped to entity table
  class abstract User : Entity { /*members*/ } // mapped to user table
  
  class Employee : User { /*no members*/ } // no table, discriminator = "E"
  class Contractor : User { /*no members*/ } // no table, discriminator = "C"
  </pre>
  
  <p>Here's my mappings in two separate hbm files:</p>
  
  <pre>
  &lt;class name="Entity" table="entity" xmlns="urn:nhibernate-mapping-2.2"&gt;
    &lt;id name="Id" column="id"&gt;
      &lt;generator class="guid.comb" /&gt;
    &lt;/id&gt;
    &lt;property ... /&gt;
  &lt;/class&gt;
  
  &lt;joined-subclass name="User" extends="Entity" table="user">
    &lt;key column="id" />
    &lt;discriminator column="type" />
    &lt;property ... />
    &lt;subclass name="Employee"   discriminator-value="E" />
    &lt;subclass name="Contractor" discriminator-value="C" />
  &lt;/joined-subclass>
  </pre>
  
  <p>The following is the exception I get:</p>
  
  <p>MappingException: XML validation error: The element 'joined-subclass' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'discriminator' in namespace 'urn:nhibernate-mapping-2.2'.</p>
  
  <p>What am I missing?  Can you not map a discriminated subclass hierarchy of a joined-subclass?</p>