title: HQL :parameter length
body: <p>How do I perform <code>substring</code> with a parameter's length?</p>
  
  <p>i.e.</p>
  
  <pre><code>Query query = HibernateUtil.getSessionFactory().getCurrentSession().createQuery("SELECT * from User where substring(name, 1, :name.length()) like :name");
  </code></pre>