title: Specifying type of String while setting parameter value in Hibernate
body: <p>I wonder if it's possible to control the type of string (unicode or ANSI) while setting parameter value in the queries generated by Hibernate.<br>
  The problem is that the most of the tables in my application have varchar/char columns , and these columns are often appear in various filters.  However, all queries generated by Hibernate set parameter type to <code>nvarchar/nchar</code> making all indexes built on varchar columns pretty much unusable (index scan or full table scan instead of index seek/lookups ) .   </p>
  
  <p>As a workaround I set <code>sendStringParametersAsUnicode</code> ODBC connection parameter to false which solved performance issues , but I hope it should be the way to specify which string parameter has to be Unicode, and which  is just simple ANSI string. </p>
  
  <p>Thank you. </p>