What is the way to rollback transaction if something goes wrong using hibernate api?
Answer / Anurag Chandola
To rollback a transaction in Hibernate, you should use the `Session.getTransaction().rollback()` method if something goes wrong during the execution of the operation.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is hibernate criteria?
What is cache in hibernate?
What is detached object in hibernate?
How to insert data into database using spring mvc and hibernate?
How can we invoke stored procedures in hibernate?
What is spring and hibernate framework?
Why we use hibernate instead of jdbc?
Which method is used to remove a persistent instance from the datastore?
What is the difference between get and load in hibernate?
What is criteria in hibernate?
How to implement joins in hibernate?
How components are used in hibernate?