title: How to model a tree with Hibernate?
body: <p>I've got a class called "Domain". Each Domain can have multiple sub-domains (of the same type).</p>
  
  <p>I need to be able to determine sub-domains and root-domains. Sub-domains can have sub-domains themself. This can be quite a few levels deep.</p>
  
  <p>Example:</p>
  
  <pre><code>Rootdomain  
  |- Subdomain 1  
  |   |- Subdomain 2  
  |   |
  |   |- Subdomain 3
  |
  |- Subdomain 4
  |   |- Subdomain 5
  </code></pre>
  
  <p>How do I model such a Java-class with Hibernate annotations?</p>