title: Mapping a simple array
body: <p>I'm using fluent Nhibernate to map a simple class<br>
  And using Schema Generation to create this class on MySQL DB.<br>
  I can't use IList&lt;> for my properties (I'm mapping cross-language domain classes)<br>
  So I have to use simple arrays..</p>
  
  <p>I Want NHibernate to create a connection table between the two classes,<br>
  These are the domain classes:  </p>
  
  <pre><code>    public class ClassOne
      {
          public virtual Guid Guid { get; set; }
          public virtual String Title { get; set; }
          public virtual ClassTwo[] Tags { get; set; }
      }
  
      public class ClassTwo
      {
          public virtual Guid Guid { get; set; }
          public virtual string Title { get; set; }
      }
  </code></pre>
  
  <p>And this is the map:</p>
  
  <pre><code> public class ClassOneMap : ClassMap&lt;ClassOneMap&gt;
      {
          public ClassOneMap ()
          {
              Id(x =&gt; x.Guid).GeneratedBy.GuidComb();
              Map(x =&gt; x.Title);
              HasManyToMany(x =&gt; x.Tags)
                  .Cascade.SaveUpdate());
  
          }
      }
  
      public class ClassTwoMap : ClassMap&lt;ClassTwo&gt;
      {
          public ClassTwoMap()
          {
              Id(x =&gt; x.Guid).GeneratedBy.GuidComb();
              Map(x =&gt; x.Title);
          }
      }
  </code></pre>
  
  <p>The schema generates great! It has a ClassOne, ClassTwo and ClassTwoToClassOne Tables
  But when I'm trying to persist an instance of ClassOne I have an Invalid Cast exception..
  This is solved by changing the arrays to IList's but I can't really do that..</p>
  
  <p>Can anyone tell me how to configure the Fluent mapping to use Arrays without changing the schema architecture? </p>
  
  <p>Thanks A'lot!</p>