title: How can I update specific field in database by HibernateTemplate
body: <p>I want to update a specific field in the database <code>Persons</code> table by using HibernateTemplate. I am trying to do like this but this not working.</p>
  
  <pre><code>public void  updateDate(int Id,Date receivedDate) {
        Id = 10;
        receivedDate = 2012-11-12;
        String queryString = "update Persons set recievedDate=? where Id=? ";
        getHibernateTemplate().update(queryString, new Object[] { Id, receivedDate });
  }
  </code></pre>
  
  <p>I am getting an exception "UnkownEntity" when I run this query. Can I do update of a specific field at all by using HibernateTemplate? Is there any other alternate to do specific field update?</p>