I have an AbstractDao implemented by every Dao of my database.
public abstract class AbstractDaoImpl extends HibernateDaoSupport {
(...) public void delete(T pEntity) throws FerdeDaoException {
try {
this.getHibernateTemplate().delete(pEntity);
} (...)
}
....
Bascially the flushMode seems to be at AUTO.
What do i want ?
I want to be sure that when this class is use in unit test, I want to have a flush after every basic operation (delete, update, save) with this class above.
What is a solution ?
i think i would have to add after the line : this.getHibernateTemplate().delete(pEntity) in the method above
this one : this.getHibernateTemplate().flush() only for my unit test.
But i cant add it directly in the AsbtractDao because it is used in other project where the flush will be done automatically.
Or do i have nothin to add because the AUTO flushmode flush after every DELETE/SAVE/UPDATE operation ?? ( i dont have read that ine the javadoc).
Thanks in advance for your anwser.