title: ManyToMany mapping issue
body: <p>I have the following domain objects:</p>
  
  <pre><code>public class UserSpecialization : PersonSpecialization, IUserSpecialization
  {
      public static readonly string SpecializationNameValue = "User";
  
      public UserSpecialization()
      {
          Roles = new Collection&lt;IRole&gt;();
      }
  
      public virtual IEnumerable&lt;IRole&gt; Roles
      {
          get;
          set;
      }
  }
  
  public abstract class PersonSpecialization : DomainObjectOfInt32, IPersonSpecialization
  {
      public virtual IPerson Person { get; set; }
      public virtual string SpecializationName { get; protected set; }
  }
  
  public class Person : DomainObjectOfInt32, IPerson, IAuditable
  {
      public Person()
      {
          Specializations = new List&lt;IPersonSpecialization&gt;();
      }
  
      public virtual IList&lt;IPersonSpecialization&gt; Specializations { get; protected set; }
  }
  
  public abstract class Role : DomainObjectOfInt32, IRole, IAuditable
  {
      public Role(string roleName)
          : this()
      {
          Name = roleName;
      }
      protected Role()
      {
          AssignedUsers = new Collection&lt;IUserSpecialization&gt;();
      }
  
      public virtual ICollection&lt;IUserSpecialization&gt; AssignedUsers
      {
          get;
          protected set; }
  }
  </code></pre>
  
  <p>My mapping is as follow:</p>
  
  <pre><code>public class PersonMap : ClassMap&lt;Person&gt;
  {
      public PersonMap()
      { 
          Id(x =&gt; x.Id).GeneratedBy.Identity();
          HasMany&lt;PersonSpecialization&gt;(c =&gt; c.Specializations)
              .Cascade.AllDeleteOrphan();
      }
  }
  
  public class RoleMap : ClassMap&lt;Role&gt;
  {
      public RoleMap()
      {
          Id(x =&gt; x.Id).GeneratedBy.Identity();
          HasManyToMany&lt;UserSpecialization&gt;(x =&gt; x.AssignedUsers).Table("UserRole");
          DiscriminateSubClassesOnColumn("Type");
      }
  }
  
  public class PersonSpecializationMap : ClassMap&lt;PersonSpecialization&gt;
  {
      public PersonSpecializationMap()
      {
          Table("PersonSpecialization");
  
          Id(c =&gt; c.Id).GeneratedBy.Identity();
  
          DiscriminateSubClassesOnColumn&lt;string&gt;("SpecializationName");
  
          Map(x =&gt; x.SpecializationName).ReadOnly();
  
          References&lt;Person&gt;(c =&gt; c.Person);
      }
  }
  </code></pre>
  
  <p>Now when i select a Person, i get also all his roles in Roles collection. Also when saving a Role, all linked Persons are nicely saved.
  But when i save a Person, the linked roles of that Person does not save.</p>
  
  <p>How can i solve this issue? </p>
  
  <p>The mapping of UserSpecialization :</p>
  
  <pre><code>public class UserSpecializationMap : SubclassMap&lt;UserSpecialization&gt;
  {
     public UserSpecializationMap()
      {
          Table("User");
  
          DiscriminatorValue(UserSpecialization.SpecializationNameValue);
  
          Join("[User]", joined =&gt;
          {
              joined.Map(c =&gt; c.UserName, "Username");
  
              joined.HasManyToMany&lt;Role&gt;(x =&gt; x.Roles).Inverse()
                  .Table("UserRole");
          });
      }
  }
  </code></pre>