title: Hibernate - unexpected token: in while update
body: <p>I am getting this error, and I am not able to figure out if there is any error in my query.</p>
  
  <p>Error is:</p>
  
  <p><code>
  ERROR:   line 1:8: unexpected token: in
  line 1:8: unexpected token: in</p>
  
  <pre><code>at org.hibernate.hql.internal.antlr.HqlBaseParser.updateStatement(HqlBaseParser.java:232).......&lt;/code&gt;
  </code></pre>
  
  <p>I am trying to update a table by HQL, following is that code:</p>
  
  <pre><code>Query query = session.createQuery("update Order set paymentStatusId = :pid where id = :id");
      query.setParameter("pid", paymentStatusId).setParameter("id", orderId);
  query.executeUpdate();
  </code></pre>
  
  <p>My POJO is below:</p>
  
  <pre>@Entity
  @Table(name = "\"orders\"")
  public class Order implements Serializable{   
      //getters-setters
  }
  </code></pre>