title: NHibernate Set Property Default Value
body: <p>Is it possible to set the default value of a property in NHibernate? Here is the scenario:</p>
  
  <p>I have a self join table <code>Category</code>. The class and table structure are as follows:</p>
  
  <pre><code>Category
  int Id
  string Name
  Category ParentCategory
  
  Category
  int Id not null
  varchar Name not null
  int ParentCategoryId not null
  </code></pre>
  
  <p>If a category has no parent, the <code>ParentCategoryId</code> must be 0.</p>
  
  <p>How do I do this? TIA.</p>