title: Fluent Nhibernate sublass mapping HasMany with where clause with column from Parent Class
body: <p>I have three entity classes: Entity, Special and Regular with hierarchy as below</p>
  
  <pre><code>public class Entity
  {
      public Guid Id { get; set; }
      public bool IsDeleted { get; set; }
  }
  
  public class Special : Entity
  {
      public IEnumerable&lt;Regular&gt; Regulars { get; set; }
  }
  
  public class Regular : Entity
  {
  
  }
  </code></pre>
  
  <p>To map this entities I use ClassMap and SubclassMap
  In my subclass I try to map collection Regulars from entity Special with Where clause as following:</p>
  
  <pre><code>public class SpecialMap : SubclassMap&lt;Special&gt;
  {
      public SpecialMap()
      {
          HasMany(x =&gt; x.Regulars).Where("IsDeleted = 0");
      }
  }
  </code></pre>
  
  <p>but it not works because when I try to use this collection the error <strong>Invalid column name 'IsDeleted'</strong> is show. It seems that nhibernate tries to find IsDeleted column in table Regular, but there is no columns with such, in table Entity only. What can I do with that?</p>
  
  <p>PS. Probably I've explained not correct, it's my English level:) 
  here is an identical to my issue <a href="https://stackoverflow.com/questions/1903988/nhibernate-explicit-fluent-column-mapping">NHibernate explicit fluent column mapping</a> but without useful answers</p>