问题
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.
回答1:
Use this code
hibernateConection.setAutocommit(false);
Savepoint savepoint = hibernateConection.setSavepoint();
where, hibernateConection
is object of third party library liquibase.ext.hibernate.database.HibernateConnection
来源:https://stackoverflow.com/questions/6594759/savepoint-using-hibernate