adspace
What is difference between save and persist method in hibernate?
Answer Posted / Vivek Kumar
The 'save' method in Hibernate is deprecated since Hibernate 4.0. It performs both insert and update operations based on the current state of the entity instance. On the other hand, the 'persist' method only adds an entity to the persistence context without performing any database operation, leaving the actual insert operation for later when transaction commits.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers