title: Nhibernate Table per class hierarchy
body: <p>I tried to add <code>&lt;discriminator&gt;</code>:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8" ?&gt;
      &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="X" namespace="X.y"&gt;
       &lt;class name="RawAttachment" table="Metadata_Attachment"&gt;
          &lt;id name="AttachmentId"&gt;
            &lt;generator class="guid" /&gt;
          &lt;/id&gt;
          &lt;discriminator column="PAYMENT_TYPE" type="String"/&gt; 
    &lt;subclass
      name="Attachment"
      discriminator-value="Cash"&gt;
       &lt;property name="LocationId"/&gt;
     &lt;/subclass&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <p>but got the following error:</p>
  
  <blockquote>
    <p>The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has
    invalid child element 'discriminator' in namespace
    'urn:nhibernate-mapping-2.2'. List of possible elements expected:
    'property, many-to-one, one-to-one, component, dynamic-component,
    properties, any, map, set, list, bag, idbag, array, primitive-array,
    join, subclass, joined-subclass, union-subclass, loader, sql-insert,
    sql-update, sql-delete, filter, resultset, query, sql-query' in
    namespace 'urn:nhibernate-mapping-2.2'.</p>
  </blockquote>
  
  <p>why?</p>