Hi Paul,
As you want to update only particular rows, you will have to use HQL and it is will have lot of coding.
The code below is not test, just a way:
Customer cust = // You will get it from your front end.
String hql = "update Customer set name = :newName, desc= :newDesc where id = :oldId";
Query query = s.createQuery( hqlUpdate )
if(cust.getName() !=null)
query.setString( "newName", cust.getName() )
if(cust.getDescription() !=null)
query.setString( "newDesc", cust.getDescription() )
query.setString( "oldId", cust.getId() )
int updatedEntities = query.executeUpdate();
Look into the below link for updating specific columns.
http://www.hibernate.org/hib_docs/v3/re ... tch-direct
Note: dont use one with alais as stated in documentation.
But for doing it like this, may be you can get the object back from the db and then update the object with the new values and using session.update() you can do it.