title: HQL does not ignore values with blank string in column
body: <p>I am trying to setup a query for my application to pull only values from a table that have a specific column set.  Mostly this column will be null, but if you edit and save the item on the application end without putting anything in this field, then it saves a blank string to that database field.  </p>
  
  <p>I have tried the TSQL query:</p>
  
  <p><code>SELECT * from TABLE where COLUMN is not NULL AND COLUMN != ''</code></p>
  
  <p>This query returns the results I need, but when I run the same query in HQL:</p>
  
  <pre><code>SELECT OBJECT from TABLE where COLUMN is not NULL and COLUMN &lt;&gt; ''
  </code></pre>
  
  <p>Then it still contains the values that have a blank string in that column.  I have tried this using HQL with the operators &lt;> and !=, and have also tried converting it to a criteria object using <code>Restrictions.ne("column","")</code> but nothing seems to provide the result I need.  </p>
  
  <p>I tried Length as in the comments, but had no luck.  With the length in the query hibernate generates the full query as so.  the time_clock_id column is the one that i'm having the problem with.  Hibernate is set to SQLServerDialect</p>
  
  <pre><code>select timezone0_.time_zone_id as time1_368_, timezone0_.version as version368_, timezone0_.modification_timestamp as modifica3_368_, timezone0_.time_offset as time4_368_, timezone0_.modification_user as modifica5_368_, timezone0_.name as name368_, timezone0_.description as descript7_368_, timezone0_.active as active368_, timezone0_.time_clock_id as time9_368_ from time_zone timezone0_ where timezone0_.active=1 and (timezone0_.time_clock_id is not null) and len(timezone0_.time_clock_id)&gt;0
  </code></pre>