title: Is it possible to use NHibernate Filters to filter through references?
body: <p>Contrived example, but let's say I have a these entities:</p>
  
  <pre><code>public class Root
  {
      public virtual Customer Customer { get; set; }
  }
  
  public class Customer
  {
      public virtual CustomerData Data { get; set; }
  }
  
  public class CustomerData
  {
      public virtual string FooName { get; set; }
  }
  </code></pre>
  
  <p>Now, let's say I want to create a filter for Root based on the value of FooName. Intuitively, I tried this in my FooMap class. Using Fluent mappings.</p>
  
  <pre><code>ApplyFilter("FooNameFilter", "Customer.Data.FooName in (:argument)");
  </code></pre>
  
  <p>This doesn't work. A SqlClient.SqlException is thrown stating <code>The multi-part identifier "Customer.Data.FooName" could not be bound.</code></p>
  
  <p>Is there a way to make filters work this way, or am I forced to move that logic into all <code>Query&lt;Root&gt;()</code>s instead?</p>