title: Hibernate UPDATE via createSQLQuery used with RETURNING
body: <p>I was trying to make an UPDATE statement that updates few columns and return the updated row as an Entity.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>User user = (User) session
      .createSQLQuery(
        "UPDATE \"user\" " + 
        "SET chips_balance=chips_balance + 100" +
        "WHERE id=118 " +
        "RETURNING *")
      .addEntity(User.class)
      .uniqueResult();
  </code></pre>
  
  <p>It party works, meaning, it really returns an updated 'User' entity, BUT it doesn't update the actual data in the DB table!</p>
  
  <p>Is there something to do in order to make it work well?</p>
  
  <p>Thank you!</p>