3

The issue is i m using save or update in hibernate on temporary base...

now when i finally fire update it will store it in DB permanently otherwise rollback it..

how to make save point using hibernate base is spring.

like

HibernateTemplate hibernateTemplateObj = getHibernateTemplate();

hibernateTemplateObj.saveOrUpdateAll(userList);

now i would like to add savepoint in connection before save or update.

Any help would be appriciate..

Thanks in adv.

Ruchi
  • 5,032
  • 13
  • 59
  • 84

1 Answers1

2

Use this code

hibernateConection.setAutocommit(false);

Savepoint savepoint = hibernateConection.setSavepoint(); 

where, hibernateConection is object of third party library liquibase.ext.hibernate.database.HibernateConnection

Yogesh Prajapati
  • 4,770
  • 2
  • 36
  • 77