public class ObjectDaoImpl extends HibernateDaoSupport implements ObjectDao { public int add(Object item) {
//Session session = this.getSession();
//Transaction ts = session.beginTransaction();
try {
this.getHibernateTemplate().save(item);
return 1;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
return 0;
}
}
}添加不报异常,在spring配置文件里面已经配置好声明式事务,返回值是一,但数据库添加不了数据     有自动生成id,在断点中可以看到生成的id,并且生成了sql语句,请各位大侠帮忙!