title: How to use the formula property in NHibernate mapping
body: <p>I have a question regarding how to use the formula property to be used in the SQL where clause. Sepcifically, I'd like to use (datepart(hh, getdate())) as the formula and the resulting SQL that I expect is </p>
  
  <blockquote>
    <p>Select select_list from table_name
    where (datepart(hh, getdate()))  &lt; 17</p>
  </blockquote>
  
  <p>But I kept the where clause like this:</p>
  
  <blockquote>
    <p>where (this_0_.hh, getdate())) &lt;= 17</p>
  </blockquote>
  
  <p>I am not sure why the alias is inserted before the "hh" date part.</p>
  
  <p>Any help on how to get this where clause right is highly appreciated!</p>
  
  <p>Thanks.</p>