title: Named query with input parameter
body: <p>I am learning JPA with Hibernate, using maven as well. My problem is How can I use input parameters with UPDATE and SET clause in named query ?</p>
  
  <pre><code> @NamedQuery(name = "updateEmailAddress", query = "Update User u set u.email = :email where u.username = :username")
  </code></pre>
  
  <p>It gives me an error that a parameter can only be used in the WHERE or HAVING clause. I referred several article but still cannot find the proper solution. </p>