title: NHibernate Has Many Relationship with Grandchild Table Containing Multiple Many-to-One References
body: <p>there are three existing tables defined like the following:</p>
  
  <pre><code>create table business_units (id number(10,0) not null, ... , primary key (id))
  create table categories (id number(10,0) not null, ... , primary key (id))
  create table paragraphs (
      id number(10,0) not null,
      business_unit_fk number(10,0),
      category_fk number(10,0),
      ...,
      primary key (id)
  )
  </code></pre>
  
  <p>the entities are defined like:</p>
  
  <pre><code>public class BusinessUnit : Entity {
      public virtual IList&lt;Category&gt; Categories { get; protected set; }
  }
  
  public class Category : Entity {
      public virtual IList&lt;Paragraph&gt; Paragraphs { get; protected set; }
  }
  
  public class Paragraph : Entity {
      public virtual BusinessUnit Category { get; set; }
      public virtual Category Category { get; set; }
  }
  </code></pre>
  
  <p>i have tried the following overrides:</p>
  
  <p><code>BusinessUnit</code> auto-mapping override:</p>
  
  <pre><code>mapping.HasMany(x =&gt; x.Categories)
      .Table("pp_paragraphs")
      .KeyColumn("business_unit_fk")
      .Inverse();
  </code></pre>
  
  <p><code>Category</code> auto-mapping override:</p>
  
  <pre><code>mapping.HasMany(x =&gt; x.Categories)
      .Inverse();
  </code></pre>
  
  <p>i have has-many and many-to-one conventions that take care of the column names, so i don't think i need to specify here (or at least i don't think so). The auto-mapper takes care of the many-to-one reference for <code>Paragraph</code>.</p>
  
  <p>the has-many mapping for <code>BusinessUnit</code> does not work. how can i pull this off?</p>