title: Mapping multi-Level inheritance in Hibernate
body: <p>Currently I have a structure like this:</p>
  
  <pre><code>A
  |
  +--B
  |
  +--C
  </code></pre>
  
  <p>It's mapped with one table per subclass using joined tables. For historic reasons I also use a discriminator, so the current situation is as described in <a href="http://www.hibernate.org/hib_docs/v3/reference/en-US/html/inheritance.html#inheritance-tablepersubclass-discriminator" rel="noreferrer">Section 9.1.3 of the Hibernate manual</a>.</p>
  
  <p><strong>Question:</strong> How do I extend the mapping for a structure like this:</p>
  
  <pre><code>A
  |
  +--B
  |  |
  |  D
  |
  +--C
  </code></pre>
  
  <p>Can I <code>&lt;subclass&gt;</code> a <code>&lt;subclass&gt;</code> in the hibernate mapping? What <code>&lt;key&gt;</code>s do I need?</p>