title: NHibernate map single table with parent / child relationship
body: <p>I am experimenting with NHibernate instead of writing all my own SQL. But I already run into trouble mapping my experimental Domain model of just a few classes. The problem I am currently having is the relationships as demonstrated by the class below.</p>
  
  <p>Can anyone show my how this would be mapped in NHibernate? (The XML)!</p>
  
  <pre><code>public class Category
  {
      public virtual Guid Id { get; set; }
      public virtual string Description { get; set; }
      public virtual Category Parent { get; set; }
      public virtual ISet&lt;Category&gt; Subcategories { get; set; }
  }
  </code></pre>