title: How to Update Multiple Fields at Once with HQL?
body: <p>There's no problem with updating one field at a time:</p>
  
  <pre><code>hibernateTemplate.getSessionFactory().getCurrentSession().createQuery("UPDATE User set email='" + email+ "' where id='" + userId + "' ").executeUpdate();
  </code></pre>
  
  <p>But what if I want to update multiple fields at once? I added "AND" between the parameters but it didn't work:</p>
  
  <pre><code>hibernateTemplate.getSessionFactory().getCurrentSession().createQuery("UPDATE User set email='" + email+ "' AND firstName= '" + firstname + "' AND lastName= '"+lastname+"' AND password= '" + mdp + "' where id='" + userId + "' ").executeUpdate();
  </code></pre>
  
  <p>Could you please tell me how can I update many fields at once using HQL? Thanks.</p>