title: Mapping an abstract base class property to multiple tables (one for each derived class)
body: <p>I'm using fluent nhibernate, and I'm trying to map a property in my abstract base class, that can't exist on it's own, to a certain table that depends on what the derived class is.</p>
  
  <pre><code>public class UnmappedClass : Entity&lt;Guid&gt;
  {
      // This class isn't mapped to a table on its own, its mapping depends on the class that uses it
  }
  
  public abstract class BaseClass : Entity&lt;Guid&gt;
  {
      // mapping depends on derived class, not mapped to anything in base class
      protected IList&lt;UnmappedClass&gt; myList = new List&lt;UnmappedClass&gt;();
  
      public virtual IEnumerable&lt;UnmappedClass&gt; Stuff
      {
          get { return myList.ToList(); }
      }
  }
  
  public class DerivedClass : BaseClass
  {
      // At this point, I need to map MyClass in member myList to a table specific to DerivedClass
  }
  </code></pre>
  
  <p>I've tried the following in an override and get the error <code>Invalid object name 'UnmappedClass'.</code></p>
  
  <pre><code>mapping.HasMany(Reveal.Member&lt;DerivedClass, IEnumerable&lt;UnmappedClass&gt;&gt;("myList"))
      .Table("TableName")
      .Access.Field()
      .Cascade.AllDeleteOrphan()
      .Inverse();
  </code></pre>