title: convert hibernate query to criteria for all record
body: <p>I'm using the below code for update using query. But I want to change it into criteria. How can I change to criteria. Which is faster query or criteria?</p>
  
  <pre><code>Query query=getSession().createQuery("update Chat set isRead='1' where merchant.id=:merchantId and customerMobile=:mobile");
          query.setLong("merchantId", merchantId);
          query.setString("mobile", mobile);
          query.setParameter("mobile", mobile);
          int modifications=query.executeUpdate();
  </code></pre>