title: HQL insert ... select with parameters
body: <p>I need to execute batch insert select statement:</p>
  
  <pre><code>Query query = em
          .createQuery(
          "insert into EntityA (a,b,entity_field) select t.a, t.b, 
           :entity_field from EntityA t where ...");
  query.setParameter("entity_field ", entity);
  </code></pre>
  
  <p><strong>Field entity_field is not a primitive type in EntityA</strong>
  I am getting java.lang.IllegalArgumentException: org.hibernate.QueryException: number of select types did not match those for insert.</p>
  
  <p>Is there some way to do that?</p>