i did it like you told me and it works.
Code:
public class PagoDAOHibernate extends HibernateDaoSupport
{
public void savePago(final Pago pago) {
DataSource dataSource = SessionFactoryUtils.getDataSource(getSessionFactory());
JdbcTemplate tmpl = new JdbcTemplate(dataSource);
int numOperacion = tmpl.queryForInt("VALUES NEXTVAL FOR SEQ01");
pago.setNumOperacion(new Integer(numOperacion));
getHibernateTemplate().saveOrUpdate(pago);
}
}
but i wanted to do it with Hibernate, not with JDBC.
any idea???
César.