title: update query using SQLQuery in Hibernate
body: <p>I have to do this:
  Suppose:</p>
  
  <pre><code>int posterid=100;
  int userid=5;
  
  SQLQuery query=session.createSQLQuery("update poster set userid='"+userid+"' where posterid='"+posterid+"' ");
  query.executeUpdate();
  </code></pre>
  
  <p>It is not working, If I write:</p>
  
  <pre><code>SQLQuery query=session.createSQLQuery("update poster set userid=:userid where posterid=:posterid ");
  query.setParameter("userid",userid);
  query.setParameter("posterid",posterid);
  
  query.executeUpdate();
  </code></pre>
  
  <p>Is is not working too.</p>