Google News
logo
Java Hibernates - Interview Questions
What is the difference between the session.save() and session.persist() method?
The return type of the Session.save() method is java.io.Serializable. It returns the newly generated identifier id value as a serializable object. While return type of the session.persist() method does not return anything. 
 
Syntax :
Serializable ser=session.save(object);
Advertisement