what is difference between "update" method of Session class and "executeupdate" method of Query class in hibernate, when which method use?
Session.update() is used to update a single mapped entity; with
Query.executeupdate() you can perform custom delete/update statement (written is HQL or pure SQL) and get as result the updated/deleted entities count.
Which is the right method depends which is your need: with
executeupdate() you can delete/update an arbitrary number of objects based on a query, with
update() you can only update one single object at time.