hi emmanuel,
first thanks for the hint.
I tried it also with hibernate 3.1 b2. It still doesn't work.
Here is the code for deleting objects:
Code:
public class GenericInstrumentDaoImpl extends HibernateDaoSupport {
public void save(Instrument instrument) {
if (InstrumentType.BOND.equals(instrument.getInstrumentType())) {
getHibernateTemplate().saveOrUpdate("BOND", instrument);
} else if (InstrumentType.WARRANT.equals(instrument.getInstrumentType()))
{
getHibernateTemplate().saveOrUpdate("WARRANT", instrument);
} else {
getHibernateTemplate().saveOrUpdate(instrument);
}
}
public void delete(Instrument instrument) {
if (InstrumentType.BOND.equals(instrument.getInstrumentType())) {
getSession().delete("BOND", instrument);
} else if (InstrumentType.WARRANT.equals(instrument.getInstrumentType()))
{
getSession().delete("WARRANT", instrument);
} else {
getHibernateTemplate().delete(instrument);
}
}
}
Saving works well and I don't any trouble with it.
Deleting throws no exception and my unit tests work. But after calling
delete no object is deleted on the database side.
Any idea?
Thanks,
Reza