title: How to map NHibernate from table A to table A itself with many-to-many?
body: <p>Please help! I couldn't figure it out how to map the following situation:</p>
  
  <p>I have only 1 table.</p>
  
  <blockquote>
    <p>[Table] User { id, name }</p>
  </blockquote>
  
  <p>My class look like this</p>
  
  <pre><code>public class User
  {
    public int Id { get; set; }
    public string Name { get; set; }
  
    public ISet&lt;User&gt; Friends { get; set; }
  }
  </code></pre>
  
  <p>Each user has relationship with other users. e.g.'User A' can has many friends which is other User.</p>
  
  <p>What should be the mapping for this? I think this should be Many-to-Many relationship but I don't really know how the HBM will look like?</p>
  
  <p>Thanks,</p>