Save
vs. saveOrUpdate vs. persist in Hibernate
What is the difference between save and saveOrUpdate or
Difference between saving and persist are common
interview question in any Hibernate interview, much like the difference
between get and load method in Hibernate. Hibernate Session class
provides a couple of ways to save an object into the database by methods like save, saveOrUpdate, and persist. You can use either save(), saveOrUpdate() or persist() based upon
your requirement for persisting objects into the database. The key thing is that all these objects are used to store data into the database but they also make a transient object persistent in Hibernate.