title: Saying position beyond number of declared ordinal parameters
body: <p>I want to perform a native/raw mysql query using hibernate, I have this:</p>
  
  <pre><code> sessionFactory.getCurrentSession().createSQLQuery(
         "update table1 set someCounter = someCounter + 1 where id = ?")
       .setParameter(1, someId)
       .executeUpdate();
  </code></pre>
  
  <p>I'm getting the error:</p>
  
  <pre><code>threw exception [Request processing failed; nested exception is
        org.hibernate.QueryParameterException: Position beyond number of declared ordinal
        parameters. Remember that ordinal parameters are 1-based! Position: 2] 
        with root cause
        org.hibernate.QueryParameterException: Position beyond number of declared ordinal
        parameters. Remember that ordinal parameters are 1-based! Position: 2
  </code></pre>
  
  <p>What's wrong here?</p>