persist() and replicate() methods in Hibernate

persist(): 

It is equivalent to save(object) , but save(object) method returns identifier and persist(object) returns nothing. Use save() method, If you are using generator class to generate the identifier and you want to know the identifier value. Use persist() method, if you don’t want to know the generated identifier. replicate(): Use to move the […]