title: Using cfqueryparam with a ColdFusion HQL query
body: <p>I am using a HQL query to get a bunch of state objects like so:</p>
  
  <pre><code>&lt;cfquery name="LOCAL.qStates" dbtype="hql"&gt;
      from States where countryID = #ARGUMENTS.countryID#
      order by name asc
  &lt;/cfquery&gt;
  </code></pre>
  
  <p>This works fine. However, I was brought up well and I want to use <code>cfqueryparam</code>, ideally like so: </p>
  
  <pre><code>&lt;cfquery name="LOCAL.qStates" dbtype="hql"&gt;
      from States 
      where countryID = &lt;cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.countryID#" /&gt;
      order by name asc
  &lt;/cfquery&gt;
  </code></pre>
  
  <p>But this throws an error:</p>
  
  <pre><code>[empty string] java.lang.NullPointerException at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:353) at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:323) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:98) at coldfusion.orm.hibernate.HibernatePersistenceManager._executeHQL(HibernatePersistenceManager.java:822) at coldfusion.orm.hibernate.HibernatePersistenceManager.executeHQL(HibernatePersistenceManager.java:751) at ....
  </code></pre>
  
  <p>Anyone know how to get around this and use <code>cfqueryparam</code> with <code>cfquery</code> HQL queries? </p>
  
  <p>Thanks in advance!</p>