hibernate1

saveOrUpdate() method in Hibernate Session

saveOrUpdate

If the record is not present in the database, it will call save() method and inserts the record in the database. If the record is present in the database, it will call update() method and updates the record in the database. Example on saveOrUpdate: Before executing the EmployeeSaveOrUpdateExample.java in dabase

Execute EmployeeSaveOrUpdateExample.java

After […]